Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I really think that the folk who created this great excercise should just give it a look of how it is specified.
rather than making a person creates a ternary operator or if else function, it should also specify the simple fact, that since the buyer buys a bigger amount of hotdogs, then, buyer will receive a small reduction on price, whatsoever, the return should always be the cent multiplied by the times the buyer is buying a hotdog.
ahhh I took this piece of code thinking it would not work, but then doing the debuggin, found this solution amazing! Not using any prototype and very fancy code to show off your comprehension skills. I am glad I did scroll down.
And please mark your post as having spoiler content next time.
Can someone tell me what I'm doing wrong? I'm about ready to gouge my eyes out... jk
function multiTable(number) {
let str = ' ';
for(let i = 1; i <= 10; i ++){
str +=
${number} * ${i} = ${number * i}\n
};
return str;
};
HAHAHAHAHAHAH great!
looks like u solve it in Java ~~
looks like u solved it ~~
You're supposed to return the result, not print it. You don't need to call the function yourself either. You can see the expected output in sample tests (bottom right window)
This comment is hidden because it contains spoiler information about the solution
Ah, I just discover what I was failing for... Thank you!
I ended up reading and reading the question again, where I discover that basically, all the answer was needed to be on the same string, then I saw what is just below of every test, and I understood, that basically, what that text does, if give us a clue of what the outcome of our programm should be like, so I re enter solution, and printed well, then I have it right, it is correct now.
Please see if the last bullet point of this paragraph answers your question: https://docs.codewars.com/training/troubleshooting#expected-the-same
This comment is hidden because it contains spoiler information about the solution