5/13


#1

Find the errors:

// Nicely written function:
var calculate = function (number) {
var val = number * 10;
console.log(val);
};

// Badly written function with syntax errors!

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


#2

So, do you need help with anything?


#3

I already figure it out thank you very much anyways


#4

No problem, it's always good when people can figure out problems on their own :slight_smile:


#5

i tried this following code:

var greeting = function(name){
(console.log("Hey " + " " + name);
};
greeting("pankazzz")

but gives SyntaxError: Unexpected token


#6

Got my mistake for above code :+1:


#7

seems like you have one too many parenthesis. you should remove the one right before console.log

var greeting = function(name){
//here> (console.log("Hey " + " " + name);
};
greeting("pankazzz")


#8

If you are having trouble with anything or just have a question then please hit the create a new topic button.


#9

Hi I need help please
I tried this bur keep getting error " Syntax error; expected ";"
greeting var func{name}(console.log(name)))}

var greeting = function(name){
console.log("Hello" + " " + name);
};
greeting("Julie")