Growing Club
JavaScript
20 pts
Growing Club
The Keren chess club starts with 3 members. Every month the number of members doubles. Use a while loop to find out after how many months the club has at least 100 members. In every lap, double members, add 1 to months and print a line. After the loop, print the result:
Month 1: 6 members Month 2: 12 members Month 3: 24 members Month 4: 48 members Month 5: 96 members Month 6: 192 members 100 reached after 6 months
Use at most two console.log() lines.
Checklist
- Find the number of months with a
whileloop. - Double
membersin every lap. - Use at most two
console.log()lines. - Print every month and the result.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
