While and For Excersice

Hello all! Im trying to explore a bit more using while and for. I want to solve this exercise but I cant seem to find a way.

10 digits are entered, one by one, identifying how many digits of each (1,2,3 …, 8,9,10) were entered.

Welcome to the forums!

How you would approach that will depend on whether you’re asking for the numbers one at a time, or all at once.

Once you’ve decided that, write down the steps you would follow if you were doing the task by hand with a pen and paper. Those steps should be concise and easy to follow.

After you’ve got that, the steps you’ve got for your process ought to look a lot like structures you can implement in JavaScript… so write them. :slight_smile: