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.
OP solved it, closing
Hi @mrkishi,
yes, i meant functions as global 'entities' which can be accessed from the window. I do realise all the katas are in a specific enviroment designed for training purposes only, they're meant to use the global scope, however afaik it's not advisable to implement such a behaviour in a real app, since these functions may interfere with functions from other scripts and libraries.
Hey, @AncientGeek.
There are no global variables in this solution (apart from the functions). The only symbols added to the global scope are the functions
plus
,minus
,times
,dividedBy
, andzero
throughtnine
. These are required to exist in order to pass the kata. :)please correct me if i'm wrong, but isn't it a very bad practice to create variables in the global scope? I wouldn't call it 'clever' per se, but true it is the shortest solution, in this limited 'test' enviroment.
JavaScript Description does not show the code which is actually intended there after "It uses the following structure."
This comment is hidden because it contains spoiler information about the solution