├── break ├── 1 century.js ├── 2 sum upto 100.js └── 3 square break.js ├── continue ├── 1 skip odd.js └── 2 skip-five.js ├── for ├── 1 commitment.js ├── 2 odd even.js ├── 3 sum of odd numbers.js ├── 4 multiplication table.js └── 5 countDown.js └── while ├── 1 commitment.js ├── 2 odd even.js ├── 3 sum of odd numbers.js ├── 4 multiplication table.js └── 5 countdown.js /break/1 century.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Write a loop 1 to 200. Use break to exit the loop once you find 100. 4 | 5 | */ -------------------------------------------------------------------------------- /break/2 sum upto 100.js: -------------------------------------------------------------------------------- 1 | /* 2 | Write a while loop that adds numbers starting from 1, but stops (using break) as soon as the sum reaches or exceeds 100 3 | */ -------------------------------------------------------------------------------- /break/3 square break.js: -------------------------------------------------------------------------------- 1 | /* 2 | Write a loop that goes from 1 to 100, but stops (using break) when it encounters the first square number (like 4, 9, 16, etc.) 3 | */ -------------------------------------------------------------------------------- /continue/1 skip odd.js: -------------------------------------------------------------------------------- 1 | /* 2 | Write a loop to print even numbers from 1 to 40. Use continue to skip odd numbers. 3 | */ -------------------------------------------------------------------------------- /continue/2 skip-five.js: -------------------------------------------------------------------------------- 1 | /* 2 | display odd number from 55 to 85 and skip the numbers divisible by 5. 3 | */ -------------------------------------------------------------------------------- /for/1 commitment.js: -------------------------------------------------------------------------------- 1 | /*** 2 | 3 | "I will invest at least 6 hrs every single day for next 60 days!" this message 60 times. So display this. 4 | 5 | */ 6 | 7 | /*programming hero*/ -------------------------------------------------------------------------------- /for/2 odd even.js: -------------------------------------------------------------------------------- 1 | /*** 2 | 3 | Subtask-1: 4 | 5 | Find all the odd numbers from 61 to 100. 6 | 7 | */ 8 | 9 | 10 | /*** 11 | 12 | Subtask-2: 13 | 14 | Find all the even numbers from 78 to 98. 15 | 16 | */ 17 | 18 | /*programming hero*/ -------------------------------------------------------------------------------- /for/3 sum of odd numbers.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /*** 4 | 5 | Subtask-1: 6 | 7 | Display sum of all the odd numbers from 91 to 129. 8 | 9 | */ 10 | /*** 11 | 12 | Subtask-2: 13 | 14 | Display sum of all the even numbers from 51 to 85. 15 | 16 | */ 17 | 18 | /*programming hero*/ -------------------------------------------------------------------------------- /for/4 multiplication table.js: -------------------------------------------------------------------------------- 1 | /*** 2 | 3 | Generate a multiplication table for number 9 4 | 5 | */ 6 | 7 | 8 | /*programming hero*/ -------------------------------------------------------------------------------- /for/5 countDown.js: -------------------------------------------------------------------------------- 1 | /*** 2 | 3 | Implement a countdown timer that counts down from 81 to 65. 4 | 5 | */ 6 | 7 | 8 | /*programming hero*/ -------------------------------------------------------------------------------- /while/1 commitment.js: -------------------------------------------------------------------------------- 1 | /*** 2 | 3 | "I will invest at least 6 hrs every single day for next 60 days!" this message 60 times. So display this. 4 | 5 | */ 6 | 7 | /*programming hero*/ -------------------------------------------------------------------------------- /while/2 odd even.js: -------------------------------------------------------------------------------- 1 | /*** 2 | 3 | Subtask-1: 4 | 5 | Find all the odd numbers from 61 to 100. 6 | 7 | */ 8 | 9 | 10 | /*** 11 | 12 | Subtask-2: 13 | 14 | Find all the even numbers from 78 to 98. 15 | 16 | */ 17 | 18 | /*programming hero*/ -------------------------------------------------------------------------------- /while/3 sum of odd numbers.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /*** 4 | 5 | Subtask-1: 6 | 7 | Display sum of all the odd numbers from 81 to 131. 8 | 9 | */ 10 | /*** 11 | 12 | Subtask-2: 13 | 14 | Display sum of all the even numbers from 206 to 311. 15 | 16 | */ 17 | 18 | /*programming hero*/ -------------------------------------------------------------------------------- /while/4 multiplication table.js: -------------------------------------------------------------------------------- 1 | /*** 2 | 3 | As Ersa is learning now, she wants to explore more and more. Tell Ersa to generate a multiplication table for number 5 4 | 5 | */ 6 | 7 | 8 | /*programming hero*/ -------------------------------------------------------------------------------- /while/5 countdown.js: -------------------------------------------------------------------------------- 1 | /*** 2 | 3 | Implement a countdown timer that counts down from 21 to 15. 4 | 5 | */ 6 | 7 | 8 | /*programming hero*/ --------------------------------------------------------------------------------