course content

Course Content

Introduction to JavaScript

Challenge: My NameChallenge: My Name


Implement the function to output a sentence:

  1. Function should be named myName.
  2. Function should get one argument name.
  3. myName function body contains the console.log() function, which should print the sentence "My name is {name}".
  4. Call the myName function thrice with different names.

The output should be:

1. Function definition: function funcName(argument){}.

2. Put argument name to the console.log() function.

3. Call the function with different names (choose it yourself).
The function call: funcName(value) after definition.

Section 6.

Chapter 3