Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 683 Bytes

File metadata and controls

16 lines (11 loc) · 683 Bytes

JavaScript Control Structures

Objective

Understand and practice using control structures in JavaScript, such as loops and conditionals.

Instructions

  1. Clone this repository to your local machine.
  2. Create a file named control-structures.js.

Tasks

  1. Write a 'for' loop that prints numbers 0 to 4, each on a new line, in the format 'Number X', where X is the current number.
  2. Modify the 'if-else' statement from the previous exercise to include a new condition. If the name is 'Bob', print 'Hello Bob!'.

Submission

Commit and push your control-structures.js file to this repository. Ensure it includes the 'for' loop and the modified 'if-else' statement.