Skip to Content

10 days Javascript: Hello, World!

Posted on One min read

Day 0: Hello, World!

Problem description

A greeting function is provided for you in the editor below. It has one parameter, . Perform the following tasks to complete this challenge:

Use console.log() to print Hello, World! on a new line in the console, which is also known as stdout or standard output. The code for this portion of the task is already provided in the editor.
Use console.log() to print the contents of (i.e., the argument passed to main).

*   A line of code that prints "Hello, World!" on a new line is provided in the editor.
*   Write a second line of code that prints the contents of 'parameterVariable' on a new line.
* Parameter:
*   parameterVariable - A string of text.
function greeting(parameterVariable) {
  // This line prints 'Hello, World!' to the console:
  console.log('Hello, World!');

  // Write a line of code that prints parameterVariable to stdout using console.log: