Closed edrickchu closed 9 years ago
The output is a little hard to read, but once you remove those \n
and \t
it becomes more obvious what the differences are:
expected:
(global)
foo()
- var bar
- quux = ?
zip()
- var quux
actual:
(global)
foo()
- quux = ?
zip()
- var quux
Once you spot the difference you can update your solution and try again :)
Wooo! Got it :)
Seems like I just needed to keep var bar
in the solution, though, I had the scope chain correct!
One more question, what do the \n
and \t
mean?
Thanks!!
You're welcome - really glad you're enjoying it!
what do the
\n
and\t
mean?
\n
means newline\t
means tab
but that's just for output display, it doesn't mean you necessarily need to have exactly one newline and exactly one tab, etc. The code is normalised before being compared against the expected output of other normalised code.
It doesn't worked for me. Here is my code
function foo() {
var bar;
quxx = 1;
function zip() {
var quux = 2;
}
}
still it's clearing only 1/2 test
# (anonymous)
ok 1 Solution loaded
not ok 2 The structure is correct
---
operator: equal
expected:
'(global)\n\tfoo()\n\t- var bar\n\t- quux = ?\n\t\tzip()\n\t\t- var quux'
actual:
'(global)\n\tfoo()\n\t- var bar\n\t- quxx = ?\n\t\tzip()\n\t\t- var quux'
I don't get it how expected is different from actual!
@iyogeshjoshi Looks like you've got a spelling mistake there - quxx
instead of quux
.
@jesstelford sorry my bad!
:tada:
Need help with this please!
Once complete, execute scope-chains-closures verify to verify your
solution.
This is my code:
function foo() { quux = 15; function zip() { var quux = 2; } }
This is the error I get:
npm -v = 2.12.1 node -v = v0.12.7
Plmk. Thanks!