Improvement suggestion for JS Pyramid Generator (Step 50)

Hey, just a little thing:
I noticed the test passes if the console.log is put into the function scope, instead of outside and after the function call.

Likely the latter was intended, since the next step deals with the fact, that the function doesn’t have a return value and therefor the console.log (call) outputs “undefined”.

If you put the console.log into the function though, the logged “undefined” is due to the variabe named “call”, not being initialized yet in that moment. (Also: hoisting and scope isn’t taught before step 50, if i recall)

…if I’m not fully mistaken :slight_smile:

Great site btw!
Back to Learning :drooling_face:

PS: I hope posting this here is ok. I saw, that multiple such bug reports / improvement suggestions are rather all over the place?!

1 Like

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

Ah! On Github of course :slight_smile: Will do.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.