Help debugging topic 5


#1

ok they want us to debug this:

greeting var func{name}(console.log(name)))}

ok I like to think that I got it write but I'm not sure here is my code:

var greeting=function("name"){
console.log('name');
};
greeting("Jake");

but it still wont go through


#2
var greeting = function  (name) {
console.log(name);
};
greeting("Jake");

The parameter doesn't take " ", it just defines the parameter, independently from its type. As the type doesn't matter, the console.log should have the ' '. I hope you understood :smile:


#3

wow thanks a lot it makes a lot of sense actually