7 kyu
Anonymous Returns.
2,331 of 2,349cloggy45
Description:
When a function is called by itself it is bound to the global context; the this
variable of the function will be bound to the global object.
When the getNameFunc
function is called on the alpha
object the value of the name
variable outside of the object is returned: "The Window"
.
We do not want this, we want the value of the name
property inside the alpha
object to be returned.
Fix getNameFunc
so the right value is returned.
For more information: Binding
Debugging
Similar Kata:
Stats:
Created | Jul 27, 2014 |
Published | Jul 27, 2014 |
Warriors Trained | 3474 |
Total Skips | 148 |
Total Code Submissions | 6969 |
Total Times Completed | 2349 |
JavaScript Completions | 2331 |
CoffeeScript Completions | 33 |
Total Stars | 27 |
% of votes with a positive feedback rating | 85% of 218 |
Total "Very Satisfied" Votes | 164 |
Total "Somewhat Satisfied" Votes | 43 |
Total "Not Satisfied" Votes | 11 |