Challenge 1 - Fix the Code
The following code invokes a function called ‘add’ that adds two numbers together. When you run this code, it should add 13 to 27, and output ‘40’ to the console.
But this code is broken! Using your newfound JavaScript knowledge, find the bugs and fix it.
var first number = 13;
var second number = 27;
var 'add' () {
return x + y;
}
add(first number, second number);
This page was last reviewed on 3 February 2022.
It needs to be reviewed again on 3 February 2023
.
This page was set to be reviewed before 3 February 2023.
This might mean the content is out of date.