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.
This comment is hidden because it contains spoiler information about the solution
Ok, sorry for spoiler. I was think this issimple question, not spoiler.
Thank you for the answer!
This comment is hidden because it contains spoiler information about the solution
Thank you very much for the answer! Sorry, next time I'll mark my messages as question. First day at codewars, sorry for noob question.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Hello, friends! Sorry, I'm only start to learn Javascript.
I write a simple if else code. Here is my code:
function ensureQuestion() {
let someText = 'sometextinfo'
someText.endsWith('?') ? console.log(someText) : console.log(someText + '?')
}
ensureQuestion()
Can someone look, where I'm goes wrong? Because my function just checking, if someText variable end with '?', then we just show this variable. If not, we will add "?" at the end. But tests can't accept my code (in Visual Studio Code everything works correct).