#weirdjavascript 搜尋結果
Dealing with float number instead of integers could break your code. I just thought why not I should change 11/10 to 1.1 in the code. And it goes weird #javascript #weirdJavascript
When "2" + "2" is calculated, they are string so concat happens and "22" is the result. Followed by "22" - "2" where "-" is use for subtraction and strings are type casted into integers which results in 20. #javascript #weird #weirdjavascript
So I was bored and found this video in my recommended: youtube.com/watch?v=sRWE5t…. And decided to give it a try myself. So I did, with a lot of explanation because I was bored: github.com/ProfessorQu/js… #javascript #weirdjavascript
youtube.com
YouTube
JavaScript Is Weird (EXTREME EDITION)
Weird JavaScript 😂🤪 console.log(NaN === NaN); // prints false #javascript #weirdjavascript @JavaScript @JavaScriptDaily
#weirdJavascript “JavaScript — The weird parts” by @daffl medium.com/@daffl/javascr…
Weird JavaScript 😂🤪 let iAmNumber = 1; if (iAmNumber === 1) { console.log(iAmNumber); // Prints ReferenceError let iAmNumber = 2; } @JavaScript @JavaScriptDaily #javascript #weirdjavascript
Yeah! YOU Should...It is indeed a good practice as it somehow enhances the readability of the code. Point Of Termination Right! If You Know You Know ✌️ #javascript #weirdjavascript
Weird JavaScript 😂🤪 const a = (1, b = 2); console.log(a); // prints 2 console.log(b); // prints 2 @JavaScript @JavaScriptDaily #javascript #weirdjavascript
Forgot to add tags to help the thread spread. I welcome all logic why this was valid in usage but not as direct variable declaration. #javascript #weirdJavascript #observation #React #Json #techtwitter #techDiscussion #tech #sharing
Weird JavaScript 😂🤪 let infinity = 1/0; console.log(infinity); // prints Infinity console.log(typeof infinity); //prints number console.log(typeof 1/0); //prints NaN #javascript #weirdjavascript @JavaScript @JavaScriptDaily
Weird JavaScript 😂🤪 let num1 = 2; let num2 = 4; const sum = 'num1 + num2'; // Prints 6 console.log(eval(sum)); const iAmEval = eval; // ReferenceError: num1 is not defined. console.log(iAmEvalFunction(sum)); @JavaScript @JavaScriptDaily #javascript #weirdjavascript
Why [’1’, ’7’, ’11’].map(parseInt) returns [1, NaN, 3] in Javascript by @erictongs link.medium.com/iYu53IMwQ5 #weirdjavascript #100daysofcode
link.medium.com
Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in Javascript
Every idea needs a Medium
Yeah! YOU Should...It is indeed a good practice as it somehow enhances the readability of the code. Point Of Termination Right! If You Know You Know ✌️ #javascript #weirdjavascript
So I was bored and found this video in my recommended: youtube.com/watch?v=sRWE5t…. And decided to give it a try myself. So I did, with a lot of explanation because I was bored: github.com/ProfessorQu/js… #javascript #weirdjavascript
youtube.com
YouTube
JavaScript Is Weird (EXTREME EDITION)
Weird JavaScript 😂🤪 let num1 = 2; let num2 = 4; const sum = 'num1 + num2'; // Prints 6 console.log(eval(sum)); const iAmEval = eval; // ReferenceError: num1 is not defined. console.log(iAmEvalFunction(sum)); @JavaScript @JavaScriptDaily #javascript #weirdjavascript
Weird JavaScript 😂🤪 const a = (1, b = 2); console.log(a); // prints 2 console.log(b); // prints 2 @JavaScript @JavaScriptDaily #javascript #weirdjavascript
Weird JavaScript 😂🤪 let iAmNumber = 1; if (iAmNumber === 1) { console.log(iAmNumber); // Prints ReferenceError let iAmNumber = 2; } @JavaScript @JavaScriptDaily #javascript #weirdjavascript
Weird JavaScript 😂🤪 console.log(NaN === NaN); // prints false #javascript #weirdjavascript @JavaScript @JavaScriptDaily
Weird JavaScript 😂🤪 let infinity = 1/0; console.log(infinity); // prints Infinity console.log(typeof infinity); //prints number console.log(typeof 1/0); //prints NaN #javascript #weirdjavascript @JavaScript @JavaScriptDaily
When "2" + "2" is calculated, they are string so concat happens and "22" is the result. Followed by "22" - "2" where "-" is use for subtraction and strings are type casted into integers which results in 20. #javascript #weird #weirdjavascript
Why [’1’, ’7’, ’11’].map(parseInt) returns [1, NaN, 3] in Javascript by @erictongs link.medium.com/iYu53IMwQ5 #weirdjavascript #100daysofcode
link.medium.com
Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in Javascript
Every idea needs a Medium
‘BANANA’ with JavaScript by @MahdhiRezvi link.medium.com/2IizsaYyc2 What are your personal WTF moments of JavaScript? Feel free to comment :D #javascript #js #weirdjavascript #ilovejavascript #programming #happycoding
Dealing with float number instead of integers could break your code. I just thought why not I should change 11/10 to 1.1 in the code. And it goes weird #javascript #weirdJavascript
#weirdJavascript “JavaScript — The weird parts” by @daffl medium.com/@daffl/javascr…
Dealing with float number instead of integers could break your code. I just thought why not I should change 11/10 to 1.1 in the code. And it goes weird #javascript #weirdJavascript
When "2" + "2" is calculated, they are string so concat happens and "22" is the result. Followed by "22" - "2" where "-" is use for subtraction and strings are type casted into integers which results in 20. #javascript #weird #weirdjavascript
Something went wrong.
Something went wrong.
United States Trends
- 1. Brian Kelly 13.9K posts
- 2. #VERZUZ 52.7K posts
- 3. Yamamoto 61.5K posts
- 4. Birdman 14K posts
- 5. No Limit 34.4K posts
- 6. Mia X 587K posts
- 7. Colorado 33.6K posts
- 8. Cash Money 29.4K posts
- 9. Wayne 37.7K posts
- 10. Deion 1,738 posts
- 11. Salter 1,612 posts
- 12. Texas A&M 13.1K posts
- 13. Death Valley 5,000 posts
- 14. Michigan 38.6K posts
- 15. #GoBlue 3,600 posts
- 16. Turk 583K posts
- 17. Aggies 4,993 posts
- 18. Coach Prime 1,238 posts
- 19. #HalloweenHavoc 49.9K posts
- 20. Jonas Brothers 6,966 posts