6 ms·
That was great fun for non webdev Javascript coder, and I was about 3 mins in and finishing 4th problem. However, getting one of the tests wrong in 4th problem
by sireat 13y ago
That was great fun for non webdev Javascript coder, and I was about 3 mins in and finishing 4th problem.
However, getting one of the tests wrong in 4th problem because of two chinese UTF-8 symbol having more length than "tiny" kind of irked me and reminded me why I do not do webdev.
I suppose this is actually a good kind of test, because real webdevs would actually have learned not to use s.length but use something else.
What is it though? This seems like a Javascript fail more than anything else.
- danielweber 13y agoI just did that and I'm pretty sure I used "s.length()" and I didn't even notice any Chinese characters.
- sireat 13y agoI had to check typeof (apparently those two chinese characters are not a string) to fix this, again this is actually useful, but was not expected given the ease of first 3 problems.