Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 763 Bytes

10_little_monkeys.md

File metadata and controls

21 lines (18 loc) · 763 Bytes

10 Little Monkeys

Create a file named 10_little_monkeys.js and within that file, write a program that will print the following nursery rhyme, but for 10 monkeys.

Ten little monkeys jumping on the bed,
One fell off and bumped his head,
Mama called the doctor and the doctor said,
"No more monkeys jumping on the bed!"

Nine little monkeys jumping on the bed,
One fell off and bumped his head,
Mama called the doctor and the doctor said,
"No more monkeys jumping on the bed!"

Eight little monkey jumping on the bed,
He fell off and bumped his head,
Mama called the doctor and the doctor said,
"Get those monkeys right to bed!"

Bonus

Can you write the program so that it will run for any number of monkeys?