Help debugging topic 5


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"){

but it still wont go through

var greeting = function  (name) {

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:


wow thanks a lot it makes a lot of sense actually