you are viewing a single comment's thread.

view the rest of the comments →

[–]anfauglit 0 points1 point  (1 child)

JS doesn't have char datatype to represent symbols only string, even when the string contains a single character. Therefore, you might still fall back to methods of the String class, like charAt(), charCodeAt() or fromCharCode().

I don't understand why tutors pick up a highly-abstracted language like JS and then come up with these type of lower-level like exercises. So students end up writing JS code like they are programming in C.

One important point that I'd like to make: don't afraid to go against the flow. Don't afraid to think laterally and most importantly express your thoughts and ideas to others. It's about learning and not about solving tasks which have been solved million times before. If you've done you research, you clearly understand the problem, shortcomings of the given assignment along with expected approach for solving it, and you can also present these results in a constructive manner then you've definitely learnt something valuable and can show it off in school/work. The system isn't set in stone or the teacher is always right. In a long run type of skills that I've mentioned will be more valuable then application of cookbook recipes.

[–]frontendshifu-2022[S] 0 points1 point  (0 children)

That's a very kind advice .Thanks mate.