Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Dark Side of JavaScript

The Dark Side of JavaScript

Lucas Santos

May 17, 2021
Tweet

More Decks by Lucas Santos

Other Decks in Technology

Transcript

  1. Javascript
    as you never saw before

    View full-size slide

  2. cloud advocate_
    who am I_
    [email protected]
    {twitter, facebook, linkedin…}.lsantos.dev

    View full-size slide

  3. The magic JS

    View full-size slide

  4. Removing Callbacks

    View full-size slide

  5. The Dark Side of
    Javascript
    JS

    View full-size slide

  6. BUT BE AWARE_

    View full-size slide

  7. Small usage example

    View full-size slide

  8. Other usage example in Node.js source code
    bit.ly/nodejs-symbol
    Check it out!

    View full-size slide

  9. Async Iterators_

    View full-size slide

  10. Promise.finally

    View full-size slide

  11. Promise.allSettled

    View full-size slide

  12. Readonly properties_

    View full-size slide

  13. Object.defineProperty

    View full-size slide

  14. Object.defineProperties

    View full-size slide

  15. ‘age’ hasn’t been shown
    because it’s not
    enumerable

    View full-size slide

  16. Private class fields_

    View full-size slide

  17. Dynamic function creation_

    View full-size slide

  18. in operator_

    View full-size slide

  19. Dynamic instances by
    reflection_

    View full-size slide

  20. Bitwise Operators_

    View full-size slide

  21. A B C D Result
    X 0 1 0 1 5
    Y 0 0 0 1 1
    Z 0 0 0 1 1

    View full-size slide

  22. String as binary data

    View full-size slide

  23. A B C D Result
    X 0 1 0 1 5
    Y 0 0 0 1 1
    Z 0 1 0 1 5

    View full-size slide

  24. A B C D Result
    X 0 1 0 1 5
    Y 0 0 0 1 1
    Z 0 1 0 0 4

    View full-size slide

  25. Cryptography

    View full-size slide

  26. A B C D Resultado
    X 0 1 0 1 5
    Z 1 0 1 0 10

    View full-size slide

  27. Existence condition

    View full-size slide

  28. Multiply and divide

    View full-size slide

  29. refs_
    - imasters.com.br/desenvolvimento/o-lado-escuro-javascript
    - medium.com/trainingcenter/entendendo-promises-de-uma-vez-por-todas-3
    2442ec725c2
    - imasters.com.br/desenvolvimento/campos-publicos-e-privados-em-classes-j
    avascript-o-que-vem-por-ai-no-esnext
    - imasters.com.br/javascript/futuro-das-promises-no-javascript
    - medium.com/trainingcenter/iterators-em-javascript-880adef14495
    - medium.com/trainingcenter/reflection-em-javascript-73fc0e702e2
    - developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objec
    ts/Reflect
    - slides.lsantos.dev/desmistificando-heranca-e-prototipos-no-javascript
    - dev.to/khaosdoctor/entendendo-async-iterators-1opo

    View full-size slide

  30. thank you_
    info.lsantos.dev

    View full-size slide