Practice: JavaScript Loops and Conditionals
1h 42mIntermediate2022-03-29
Authors

J. David Eisenberg
Programmer and Instructor living in San Jose, California
Course details
Every JavaScript program you write will eventually have to make decisions and complete repetitive tasks. How good are you with conditionals and loops? How do you get better? Practice, practice, practice! But where to find it, and how to structure it? In this course, David Eisenberg gives you the chance to test your skills, find your focus, and work through problems that are just challenging enough to help you achieve the next level of JavaScript development. The course starts with an assessment quiz, so you can determine how much you already know about each topic, and whether you need to review or dive right into the challenges.
Skills covered
Ecma InternationalJavaScriptProgramming LanguagesSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Assess and practice your JavaScript loops and conditionals
- 02 - System setup
1. Assess Yourself
- 03 - Choose your adventure
2. Working with Conditionals
- 04 - If and else decision-making
- 05 - Challenge - High-deposit alerts
- 06 - Solution - High-deposit alerts
- 07 - Challenge - Stay above zero
- 08 - Solution - Stay above zero
- 09 - Challenge - Calculate discount offerings
- 10 - Solution - Calculate discount offerings
- 11 - Challenge - Quadratic formula
- 12 - Solution - Quadratic formula
- 13 - Challenge - Putting it all together
- 14 - Solution - Putting it all together
- 15 - Switch
- 16 - Challenge - Calculate days in a month
- 17 - Solution - Calculate days in a month
3. Working with Loops
- 18 - While structure
- 19 - Challenge - The Collatz conjecture
- 20 - Solution - The Collatz conjecture
- 21 - Challenge - Playing dice
- 22 - Solution - Playing dice
- 23 - Challenge - Calculate the break-even point of a loan
- 24 - Solution - Calculate the break-even point of a loan
- 25 - Challenge - Simulate an express lane checkout
- 26 - Solution - Simulate an express lane checkout
- 27 - For loops
- 28 - Challenge - Calculate minimum and maximum sales
- 29 - Solution - Calculate minimum and maximum sales
- 30 - Challenge - Indexed for loops to convert binary to decimal
- 31 - Solution - Indexed for loops to convert binary to decimal
- 32 - Challenge - Use for-of to convert binary numbers to decimal
- 33 - Solution - Use for-of to convert binary numbers to decimal
- 34 - Challenge - Build an inverted triangle
- 35 - Solution - Build an inverted triangle
Conclusion
- 36 - Next steps
Related courses
- Practice It: JavaScript Loops and Conditionals
- Computer Science Principles Lab: JavaScript
- Vanilla JavaScript: Mobile Game Programming
- Learning the JavaScript Language
- Controlling CSS with JavaScript
- Web Components and Modularization: Practical Approaches
- JavaScript Practice: Events
- JavaScript Practice: Object-Oriented Programming