Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.4 KB

README.md

File metadata and controls

45 lines (27 loc) · 1.4 KB

10 Days of Javascript - Day 0

To view solutions, open the file /Day0/index.html in your browser. Do not forget to open the Developer panel and see the section Console.

Day 0: Hello, World!

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:

  • 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).

Solution:

In js/hello-world.js.

Day 0: Data Types

Task:

Variables named firstInteger, firstDecimal, and firstString are declared for you in the editor below. You must use the operator to perform the following sequence of operations:

  • Convert secondInteger to an integer (Number type), then sum it with firstInteger and print the result on a new line using console.log.

  • Convert secondDecimal to a floating-point number (Number type), then sum it with firstDecimal and print the result on a new line using console.log.

  • Print the concatenation of firstString and secondString on a new line using console.log. Note that must be printed first.

Solution:

In js/data-types.js.

Return to navigation list