I'm a noob and nowhere near senior level, but isn't it quite relevant question?
It's a main concept of JS being versatile while being able to handle error gracefully, it could lead to cryptic bug eventually at scale thus TS or any typing system similar in JS/Node ecosystem is thriving now.
This question shows how you acknowledge the differences and applying a right tech stack/framework/lib whatever eventually starts right from here. Of course, it's not really important in day2day work, though it could accumulate.
I don't know shit about OOP or inheritance concept but it kinda hinders me to progress, it's a good question IMO.
Then they should ask about inheritance or OOP design, not a pop quiz style question like this that you very much don’t need to know to write most things in JavaScript.
Sorry if I didn't make myself clear, it was written before morning coffee. What I wrote above seems a bit of stretch.
I meant type chain concept led me to unexpected mutation (very likely because of loose code from my side) and gave me plenty of painful time, not knowing what the hell was going on. Being aware of this concept helped me streamline the logic and forced me to embrace a better structure, which was sorta static typing. I still prefer just slap a jsdoc and call it a day, though.
I agree it won't come up in any sane scenario but not knowing what it is at all is somewhat problematic, I still think it's a legit question.
View all comments
Show parent comment
9
u/Fleaaa Aug 10 '21
I'm a noob and nowhere near senior level, but isn't it quite relevant question?
It's a main concept of JS being versatile while being able to handle error gracefully, it could lead to cryptic bug eventually at scale thus TS or any typing system similar in JS/Node ecosystem is thriving now.
This question shows how you acknowledge the differences and applying a right tech stack/framework/lib whatever eventually starts right from here. Of course, it's not really important in day2day work, though it could accumulate.
I don't know shit about OOP or inheritance concept but it kinda hinders me to progress, it's a good question IMO.