Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: My Name | Functions
Introduction to JavaScript

Challenge: My NameChallenge: My Name

Task

Implement a function to output a sentence:

  1. Name the function myName.
  2. The function should accept one argument, name.
  3. The myName function body should contain a console.log() statement that prints the sentence "My name is {name}".
  4. Call the myName function three times with different names.

The output should be:

  1. Function definition: function funcName(argument) {}.
  2. Place the argument name inside the console.log() function.
  3. Call the function with different names (choose them yourself).
  4. Call the funcName function after defining it using the funcName(value) syntax.

¿Todo estuvo claro?

Sección 6. Capítulo 3
course content

Contenido del Curso

Introduction to JavaScript

Challenge: My NameChallenge: My Name

Task

Implement a function to output a sentence:

  1. Name the function myName.
  2. The function should accept one argument, name.
  3. The myName function body should contain a console.log() statement that prints the sentence "My name is {name}".
  4. Call the myName function three times with different names.

The output should be:

  1. Function definition: function funcName(argument) {}.
  2. Place the argument name inside the console.log() function.
  3. Call the function with different names (choose them yourself).
  4. Call the funcName function after defining it using the funcName(value) syntax.

¿Todo estuvo claro?

Sección 6. Capítulo 3
some-alt