استادی آیتم دوم این استپ که مربوط به کتاب YDKJS میشد رو خوندم. خیلی گیج کننده بود، نکاتی از js رو میگفت که منطق اشتباهی در اون ها بود.
منبع: github.com/getify/You-Dont-Know-JS/blob/1st-ed/ty…
#cs_internship
#web
#step7
2 likes · 66 views
اولین استادی آیتم از استپ ۷ رو انجام دادم، تعریف type در JS بود که مطالب کمی قدیمی بود و تغییراتی که درمورد محتوای این استادی آیتم با تازگی ریلیز شده رو از Ai دریافت کردم.
github.com/getify/You-Dont-Know-JS/blob/1st-ed/ty…
#cs_internship
#web
#step7
20 views
You-don’t-know-JS
This repository is a resource for understanding JavaScript’s quirks, nuances, and advanced features.
getify/You-Dont-Know-JS
1 like · 41 views
Is it worth reading You Don't Know JS: Async & Performance 1st ed?
I was going to read the 2nd ed version of You Don't Know JS: Async & Performance, but it's still in "todo".
Is it worth reading the 1st ed?
It was written 9 years ago.
I know it predates async/await, but I'm keen to learn how things work behind the scenes, so I'm hoping in that regard, things haven't changed too much and async/await is just syntactic sugar.
2 points · 3 comments
Thoughts on isNaN("Kyle") returning true
In github.com/getify/You-Dont-Know-JS/blob/2nd-ed/ty… it says:
>JS originally provided a global function called isNaN(..) for NaN checking, but it unfortunately has a long-standing coercion bug. isNaN("Kyle") returns true, even though the string value "Kyle" is most definitely not the NaN value. This is because the global isNaN(..) function forces any non-number argument to coerce to a number first, before checking for NaN. Coercing "Kyle" to a number produces NaN, so now the function sees a NaN and returns true! This buggy global isNaN(..) still exists in JS, but should never be used. When NaN checking, always use Number.isNaN(..), Object.is(..), etc.
But to me the fact that using a string like "Kyle" in any mathematical operation would return NaN, means it would make sense that isNaN("Kyle") is true.
What's your opinion on this?
18 comments
Mentions
استادی آیتم دوم این استپ که مربوط به کتاب YDKJS میشد رو خوندم. خیلی گیج کننده بود، نکاتی از js رو میگفت که منطق اشتباهی در اون ها بود. منبع: github.com/getify/You-Dont-Know-JS/blob/1st-ed/ty… #cs_internship #web #step7
اولین استادی آیتم از استپ ۷ رو انجام دادم، تعریف type در JS بود که مطالب کمی قدیمی بود و تغییراتی که درمورد محتوای این استادی آیتم با تازگی ریلیز شده رو از Ai دریافت کردم. github.com/getify/You-Dont-Know-JS/blob/1st-ed/ty… #cs_internship #web #step7
You-don’t-know-JS This repository is a resource for understanding JavaScript’s quirks, nuances, and advanced features. getify/You-Dont-Know-JS
Is it worth reading You Don't Know JS: Async & Performance 1st ed? I was going to read the 2nd ed version of You Don't Know JS: Async & Performance, but it's still in "todo". Is it worth reading the 1st ed? It was written 9 years ago. I know it predates async/await, but I'm keen to learn how things work behind the scenes, so I'm hoping in that regard, things haven't changed too much and async/await is just syntactic sugar.
Thoughts on isNaN("Kyle") returning true In github.com/getify/You-Dont-Know-JS/blob/2nd-ed/ty… it says: >JS originally provided a global function called isNaN(..) for NaN checking, but it unfortunately has a long-standing coercion bug. isNaN("Kyle") returns true, even though the string value "Kyle" is most definitely not the NaN value. This is because the global isNaN(..) function forces any non-number argument to coerce to a number first, before checking for NaN. Coercing "Kyle" to a number produces NaN, so now the function sees a NaN and returns true! This buggy global isNaN(..) still exists in JS, but should never be used. When NaN checking, always use Number.isNaN(..), Object.is(..), etc. But to me the fact that using a string like "Kyle" in any mathematical operation would return NaN, means it would make sense that isNaN("Kyle") is true. What's your opinion on this?