Give help. Get help.

  • # 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 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: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) {


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

You must be logged in to reply to this topic.