+ 16

Novice challenge

I've left some bugs in that code: https://code.sololearn.com/WSUcOkZocp0p/?ref=app find them and report them 😃 As I don't consider that to be too hard, the challenge is only valid for players up to lvl 10. [EDIT] - level cap is now raised to 12. [TIP] - there are two cases in which one of the methods will not act as it should.

1st Jul 2017, 2:35 PM
Nikolay Nachev
Nikolay Nachev - avatar
19 Antworten
+ 9
98k!
3rd Jul 2017, 12:44 AM
‎‏‎‏‎Joe
‎‏‎‏‎Joe - avatar
+ 7
@Amrit - stay tuned, if I don't get any answers, I'll increase the level cap 😃
1st Jul 2017, 3:47 PM
Nikolay Nachev
Nikolay Nachev - avatar
+ 7
@ $Vengat - despite the common opinion, I actually have a life and things to do in it 😂😂😂, will get there one of these days...
2nd Jul 2017, 5:53 AM
Nikolay Nachev
Nikolay Nachev - avatar
+ 7
Congrats Nikolay 101k
5th Jul 2017, 3:55 PM
‎‏‎‏‎Joe
‎‏‎‏‎Joe - avatar
+ 6
OK. That seems to be too hard... Level cap is now 12.
2nd Jul 2017, 5:41 AM
Nikolay Nachev
Nikolay Nachev - avatar
+ 5
@Jordan, not a bug - it returns undefined because the stack is empty 😃
1st Jul 2017, 7:39 PM
Nikolay Nachev
Nikolay Nachev - avatar
+ 5
JS is definitely not my best language but I've been looking at this code for the past 30 min and have found absolutely nothing wrong with neither the code or the output. It's a bit of a different way to handle things than I've ever done but it seems to work flawlessly. I guess I'll wait for somebody else to figure it out. Definitely a cool challenge though, thank you
1st Jul 2017, 8:02 PM
Jordan Chapman
Jordan Chapman - avatar
+ 5
@Christian - actually "return this" is always used in methods that do not return anything else to allow chaining
1st Jul 2017, 8:28 PM
Nikolay Nachev
Nikolay Nachev - avatar
+ 5
Nikolay go to level 17 first the whole sololearn's eyes are on you. Go for platinum level 17 by tomorrow
2nd Jul 2017, 5:50 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
2nd Jul 2017, 5:51 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 4
Not sure exactly what the code is supposed to do but line 63 loops through 11(not 10) and leaves the last output as undef/null not sure if that was a bug or just a way to show you're done
1st Jul 2017, 7:22 PM
Jordan Chapman
Jordan Chapman - avatar
+ 4
@Nikolay Nachev, thank you. I didn't know that before now, still learning Javascript.
1st Jul 2017, 8:31 PM
Chris Cypher
Chris Cypher - avatar
+ 4
well, seems we don't have a winner. The code is fixed now, comments above the bugs for those interested.
3rd Jul 2017, 5:52 AM
Nikolay Nachev
Nikolay Nachev - avatar
+ 3
So I am not eligible. And even if I am, I am bad at JS.
1st Jul 2017, 3:26 PM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar
+ 3
return this? Improper use of keyword and no property or method is specified to be returned.
1st Jul 2017, 8:08 PM
Chris Cypher
Chris Cypher - avatar
+ 3
What!? I am really bad at Javascript
2nd Jul 2017, 1:47 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
@Joe 97k not 98k ✋
3rd Jul 2017, 1:22 AM
Ekansh
+ 3
I would have never guessed. Seems to be more of a better way to setup the constructor than a bug that could actually cause problems though.
3rd Jul 2017, 7:03 AM
Jordan Chapman
Jordan Chapman - avatar
+ 2
@Nikolay Nachev Congo in advance for lvl17.I think u will make it very soon
2nd Jul 2017, 8:37 PM
Vinay Kornapalli
Vinay Kornapalli - avatar