#weirdjavascript kết quả tìm kiếm
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
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 😂🤪 const a = (1, b = 2); console.log(a); // prints 2 console.log(b); // prints 2 @JavaScript @JavaScriptDaily #javascript #weirdjavascript
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
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
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
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
‘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. Slot 90.9K posts
- 2. Powell 69.5K posts
- 3. Delap 16K posts
- 4. Gittens 18.1K posts
- 5. Sonya Massey 13.5K posts
- 6. $META 34.1K posts
- 7. Metchie 3,788 posts
- 8. Jennifer Welch 16.5K posts
- 9. Michael Carter 4,990 posts
- 10. Pierre Robert 2,092 posts
- 11. Magic 332K posts
- 12. #CarabaoCup 22.9K posts
- 13. Crystal Palace 40.4K posts
- 14. Merino 11.3K posts
- 15. Welcome to Philly N/A
- 16. #NationalCatDay 5,638 posts
- 17. Jeff Landry 2,224 posts
- 18. Anfield 12.2K posts
- 19. Woodward 7,736 posts
- 20. DeJean N/A