Get help. Give help. A Web Design and Development Community.

Function problems (scroll) NEW NAME

  • # June 24, 2013 at 8:24 pm

    I’m kinda stuck on this can someone help me?
    i’m thinking its this : but its not working. i know i’m wrong just dont know where

    var greeting;
    var name =”Attila”

    # June 24, 2013 at 9:03 pm

    You would call it like `greeting(‘Attila’);`

    # June 24, 2013 at 9:33 pm

    It would look like this:

    var greeting = function (name) {
    alert(‘Hello, ‘+name);


    # June 24, 2013 at 11:46 pm

    This reply has been reported for inappropriate content.

    this confuses me. the variable’s name is a function but the function also has a name then they add in the variable as a value but that name call the name of the function and then calling the value?

    i’m getting confussed : this is what i have. but check the link

    var greeting = function (name) {
    var val = name;

    # June 25, 2013 at 12:03 am

    What are you really asking here? In the example you provide above, you don’t need to create a new var for `val` because you can just console log `name` directly.

    # June 25, 2013 at 12:05 am

    This reply has been reported for inappropriate content.

    with this code :

    var greeting = function (name) {

    it says “Oops, try again! You did not call the greeting function. Pass it a name!”

    instructions say : Call the greeting function once it is fixed! Don’t forget to pass in a specific name.

    # June 25, 2013 at 12:08 am

    Right, because all you’ve done is create a function. You then have to actually *call* the function, like this:


    So the final correct answer would be:

    var greeting = function (name) {


    # June 25, 2013 at 12:14 am

    This reply has been reported for inappropriate content.

    man! i always forget that part. i guess i gotta keep at it . thanks doc. what’s jiggins mean?
    is this what you’re referring to?

    (1st one)

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

We have a pretty good* newsletter.