Tying it all together


#1

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

// Badly written function with syntax errors!
var greeting = function(name){

}

greeting("Moyosoluwa");
console.log();

When I run this code it takes me to the next page, but I actually don't know if the above code is right or wrong.


#2

I don't see any errors


#3

https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/0/5

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

Now the function actually does something.

This line can be removed.


#4

A post was split to a new topic: Fixed it. I think?