Movatterモバイル変換


[0]ホーム

URL:


$30 off During Our Annual Pro Sale. View Details »
Speaker DeckSpeaker Deck
Speaker Deck

#"https://www.google.com/cse">

Avatar for David Neal David Neal
April 24, 2020

#"tragically important" language that is "eating the world." Hate it? Love it? Avoid it? Embrace it?

This talk will be a parade of face-palm JavaScript fails, stupid JavaScript tricks, and bad jokes sure to get an eye-roll from everyone! Along the way, we may even learn a few mistakes to avoid and tips to make our own JavaScript less terrible!

Avatar for David Neal

David Neal

April 24, 2020
Tweet

More Decks by David Neal

See All by David Neal
The Illustrated Guide to Node.js - THAT Conference 2024
The Art of Delivering Value - GDevCon NA Keynote
Public Speaking Without Barfing On Your Shoes - THAT 2023
The Illustrated Guide to Node.js - KCDC 2023
Visual Storytelling: How to be a Superhuman Communicator
Public Speaking Without Barfing on Your Shoes - Connectaha 2023
Leadership Guide for the Reluctant Leader - Sweetwater SGS 2023
Practical Leadership Workshop - DevTernity 2022
Practical Leadership for Software Developers - DevTernity 2022

Other Decks in Programming

See All in Programming
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
ゲームの物理 剛体編
0
340
Cap'n Webについて
0
130
Cell-Based Architecture
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
令和最新版Android Studioで化石デバイス向けアプリを作る
0
400
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
0
180
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
C-Shared Buildで突破するAI Agent バックテストの壁
0
390
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
9
1.1k

Featured

See All Featured
Docker and Python
47
3.7k
Building an army of robots
306
46k
Building Applications with DynamoDB
96
6.8k
Building Adaptive Systems
44
2.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
55
3.1k
Product Roadmaps are Hard
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
37
2.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
34
2.6k
Imperfection Machines: The Place of Print at Facebook
269
13k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
196
70k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
508
140k
The Cult of Friendly URLs
79
6.7k

Transcript

  1. None
  2. None
  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. > const lol = a + b + c –

    f * ( n + o ); NaN
  13. > NaN >= 0 false

  14. > NaN <= 0 false

  15. > typeof NaN number

  16. ( a + b ) + c = a +

    ( b + c ) // mathematically true > 0.1 + 0.2 === 0.3 false > ( a + b ) + c == a + ( b + c ) ??
  17. > 0.1 + 0.2 0.30000000000000004

  18. > Math.round(0.4999999999999999722444243843710864894092082) 0 > Math.round(0.4999999999999999722444243843710864894092083) 1 I’ve got 99 problems

    but JavaScript ain’t 1.0000000000000009
  19. > [ 2, 10 ].sort() [ 10, 2 ]

  20. > ['10','10','10', '10', '10'].map( parseInt ) [ 10, NaN, 2,

    3, 4 ]
  21. > typeof undefined // undefined > typeof true // boolean

    > typeof "hello" // string > typeof 1 // number > typeof {lol:true} // object > typeof [1,2,3] // object > typeof null // object
  22. > null == 0 // false > null > 0

    // false > null < 0 // false > null >= 0 // true > null <= 0 // true > Number( null ) // 0
  23. > false > null > undefined > "" > 0

    > NaN
  24. > wat.test("javascript"); // true > wat.test("wat r u doin"); //

    false > const wat = /a/g;
  25. // undefined function troll() { return { haha: "ha!" };

    } troll(); // automatic semi-colon
  26. const arr = []; arr[1] = 1; arr[3] = 2;

    arr[10] = 3; arr.length // 11 arr[-1] = 4; arr.s = 5; arr.length // 11
  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. None
  34. None
  35. None
  36. None
  37. None
  38. None
  39. None
  40. None
  41. None
  42. None
  43. None
  44. None
  45. None
  46. None
  47. None
  48. None
  49. None
  50. None
  51. None
  52. None
  53. None
  54. None
  55. None
  56. None
  57. None
  58. None
  59. None
  60. None
  61. None
  62. None
  63. None
  64. None
  65. None
  66. None
  67. None
  68. None
  69. None
  70. None
  71. None
  72. None
  73. None
  74. None
  75. None
  76. None
  77. None
  78. None
  79. None
  80. None
  81. None
  82. None
  83. None
  84. None
  85. None
  86. None
  87. None
  88. None
  89. None
  90. None
  91. None
  92. None
  93. None
  94. None
  95. None
  96. const user1 = { firstName: "David", lastName: "Neal", address: {

    street: "123 Main Street", city: "Nashville", state: "Tennessee" } };
  97. const user1 = { firstName: "David", lastName: "Neal", address: {

    street: "123 Main Street", city: "Nashville", state: "Tennessee" } }; const city = user1?.address?.zipCode;
  98. None
  99. const v1 = falseyNullOrUndefined || "defaultValue";

  100. const v1 = falseyNullOrUndefined || "defaultValue"; const v2 = onlyNullOrUndefined

    ?? "defaultValue";
  101. globalThis = window ?? self ?? global;

  102. Promise.all() –or- Promise.allSettled()

  103. let config; if (production) { config = await import("./config.production.js"); }

    reportBtn.addEventListener("click", async () => { const reporter = await import("./reporter.js); reporter.generateReport(); });
  104. const integers = Array.from(html.matchAll(/[0-9]*/g));

  105. const big = BigInt(Number.MAX_SAFE_INTEGER); const big2 = 9007199254740991n; const evenBigger

    = big + 3000000n;
  106. None
  107. None
  108. None
  109. To boldly go where NaN has undefined before!

  110. None
  111. None
  112. None
  113. None
  114. None
  115. None
  116. Mobile Apps Automation / DevOps Command Line (CLI) Services

  117. None
  118. None
  119. None
  120. None
  121. None
  122. None
  123. None
  124. None
  125. None
  126. None

[8]ページ先頭

©2009-2025 Movatter.jp