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 read the hint is bind. I was reading about this method and think I understand it. Any option of solution didn't work. I opened the solution. And I see the most understandable option with "}.bind(this)". I've never seen such syntax "}.methodName"!! How could I guess it is possible??? I'm very sad(
JS: Node v14 should be used along with its appropiate assertion tools (Mocha + Chai).
Refer to this and this
Well, about that
How does the anti-cheat work?
I have the same problerm!
You should provide some test cases.
Your tests never check to see if the private variables are actually private.
Additional test cases would be helpful, and maybe a note on the difference between privelged functions and prototypical functions.
I typed that exact code in the solution and it didn't allow me to pass it.
it asks for privite methods however it needs the method to be written with a ' this. ' for it to work.
+1 for visibility
No Example test provided.
Your test case expect "Sam" to be initialized before you call setName.
A solution with a public variable
name
can pass the tests, which is not what was expected from the kata description.True, you could also write that without the extra
method
variable by binding the function tonull
and then calling it:instance.getName.bind(null)()
Loading more items...