Short excercise question

Hello! I would like to ask if somebody could solve this excercise for me?

Define an order() function that announces your ice cream order.

It should take two arguments: the number of scoops and the flavor. It should return the order in this format: "Lemme get [number] scoops of [flavor]!" It should use “scoop” when number is 1 and “scoops” for anything greater.

I got stuck when doing the practice and there is no video explanation to this particular one.

Would be much appreciated, thanks!


Best to all of you!

Have you tried writing any code for it so far and it’s just not doing what you expect? If so, post what you have written here so we can see what the issue is! It doesn’t help too much if we just solve it for you without you giving it a go.


Hi! You are right about that! After going through functions again on codecademy, I am realising I am just not comfortoable with functions yet and codecademy is too fast for me. I need to practice functions more as I am not able to make my own function when there is a task to be done.

I am happy to take suggestions for sites where one can effectively practice functions!



1 Like

I am now going for this site:

Maybe I am gonna be able to find what I look for!

Just be careful, that site is for the Java language, which is completely different from JavaScript! One site that will help you do challenges-by giving them to you-is Codewars. This article also gives a list of the ten most popular coding challenge websites. If you wanted an online text-editor/compiler, so you can completely write your own code, is a good one.

Wow! Thanks for this answer, I am excited to start one of those sites!

And yes, I just realised there is a difference between Java and JavaScript. Crazy! So much to learn! :slight_smile:


1 Like

If you were interested in why Java and JavaScript both have the word Java in their names, this CodeCademy video explains it well.