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 like how Best Practices and Clever buttons are useless cause here we see ppl think using eval (which is banned/discouraged everywhere) is kinda cool.
you & me both pal haha
Nice way to solve
@Toisen:
String.replaceAll
is currently not a standard Javascript function and will return an error in Node.js (see https://node.green/#ESNEXT-candidate--stage-3---String-prototype-replaceAll).It may have been implemented in Chrome and will work in your browser console, but nowhere else.
It's a non-standard function that is available in Chrome and not on CW.
read the error message
TypeError: str.replaceAll is not a function
What is
replaceAll()
?YOU DIRTY BOI
awsome!
Please forgive me, I really then got a little excited. You are completely right!
I think that opinion is a bit harsh for this example. True, eval() would not be recommended in most cases for security reasons, but consider our actual scope: a measly lvl8 kata designed for beginners. In a higher lvl kata or in an actual programming case I would agree with you.
It is bad practic because eval is bad!