DEV Community

Cover image for Day 0: Hello, World! Solution
Mohammad Hafijul Islam
Mohammad Hafijul Islam

Posted on • Updated on

Day 0: Hello, World! Solution

Statement

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

Task

  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 parameterVariable (i.e., the argument passed to main).

Constraint

Input Format

Data Type Parameter Description
string parameterVariable A single line of text containing one or more space-separated words.

Output Format

Print the following two lines of output:

  1. On the first line, print Hello, World! (this is provided for you in the editor).
  2. print the contents of parameterVariable on the second line.

Sample

Input

Welcome to 10 Days of JavaScript!
Enter fullscreen mode Exit fullscreen mode

Output

Hello, World!
Welcome to 10 Days of JavaScript!
Enter fullscreen mode Exit fullscreen mode

Explanation

We printed two lines of output:

  1. We printed the literal string Hello, World! using the code provided in the editor.
  2. The value of parameterVariable passed to our main function in this sample case was Welcome to 10 Days of JavaScript!. We then passed our variable to console.log(), which printed the contents of parameterVariable.

Solution

Hello World!

Connect

LinkedIn GitHub

Top comments (0)