Functions
Create reusable blocks of JavaScript code.
What you should understand
Read the lesson carefully, study the example, then use the editor below to experiment with the code yourself.
function greet(name) {
return 'Hello ' + name;
}
console.log(greet('Alex'));
Output
See what your code produces.
Test your understanding
Choose the best answer.
Which structure is used to store multiple values?