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.
its pop
Thanks for your advice :)
I'm still learning new shorthands in JS and I've seen that a couple of times, but I keep forgetting about this :D
I'll try using it next time. Thanks again :)
When you have a situation where the condition is the same as the truthy expression in a ternary, you can reduce this to just use an ||(or) statement.
e.g. return data[language] || 'Welcome';
This works because if the first expression is truthy, then the operation short circuits and the first expression is returned. If the first expression falsy and the second statement is truthy, the second statement gets returned. In the case where both expressions are falsy, this will return false. The last scenario won't happen in this case because your second expression is a constant truthy value.