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
- Use
console.log()
to printHello, 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 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:
- On the first line, print
Hello, World!
(this is provided for you in the editor). - print the contents of parameterVariable on the second line.
Sample
Input
Welcome to 10 Days of JavaScript!
Output
Hello, World!
Welcome to 10 Days of JavaScript!
Explanation
We printed two lines of output:
- We printed the literal string
Hello, World!
using the code provided in the editor. - 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 toconsole.log()
, which printed the contents of parameterVariable.
Top comments (0)