Skip to content

Accelerator-labs/lab-control-flow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Accelerator Track One

Conditional Drills: If/Else Statements in JavaScript

This exercise is designed to help you practice writing conditional statements using if, else if, and else in JavaScript. Conditional logic is an essential part of programming as it allows you to control the flow of your code based on different conditions.

By completing these drills, you will:

  • Write basic condition checks using if statements.
  • Use else and else if to handle multiple conditions.
  • Work with comparisons, logical operators, and different scenarios.
  • Test and debug your code to ensure it produces the correct output.

Instructions

  1. Set up your environment:

    • Fork & Clone this repo. Starter code and prompts are in conditionals.js).
    • Use Node.js to run the file in your terminal (node conditionals.js).
  2. Follow the prompts:

    • Each drill has a description and a variable setup provided for you.
    • Use if, else if, and else to implement the logic needed to meet the requirements.
  3. Test your code:

    • Run your program with the provided inputs.
    • Modify the variables to test additional scenarios and ensure your code works for edge cases.
  4. Code formatting:

    • Use clean and consistent formatting (proper indentation and comments).
    • Add comments to explain your logic if needed.
  5. Submission:

    • Complete all drills in the file.
    • Push your work your forked copy, create a pull request on the original repo, and then submit your URL on Google Classroom.
    • Be prepared to explain how your code works.

Happy coding and good luck! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%