Day 0: Task 1: Hello, World!

10 Days of JavaScript

Objective

In this challenge, we review some basic concepts that will get you started with this series. Check out the tutorial to learn more about JavaScript's lexical structure.

Task

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

  1. 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.

  2. Use console.log() to print the contents of (i.e., the argument passed to main).

Solution

function greeting(parameterVariable) {
  console.log("Hello, World!");
  console.log(parameterVariable);
}

Last updated