Report Error in introduction to functions


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

// Badly written function with syntax errors!

var greeting = function(name){

I wrote the call to the function with no arguments and submit the result and I passed the exercise. I would like to suggest one test to be sure that the param is not undefined. Thanks


you have to pass the function an argument, because you gave it the parameter, 'name', that means that you need to call it and it would look like



It is like @kyleaw said. You typing in your parameter that you want the computer to show on the screen. You have programmed your code to show a greeting on the screen you have typed out when ran. If you leave that greeting blank the computer will still run the correct code and show nothing on the screen thus passing it :smiley:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.