JumpStart – Essential Concepts

CDN vs Local file:

You would need to bundle files before deploying anyway (using webpack, eg).
The difference is the dependencies and security (depending on your server security).
(eg: npm uses digital signatures to verify identity for security).
Gulp or Webpack to package files
Recently, there’s support for node modules so you don’t have to bundle yourself. (server side rendering, bundle splitting)

npm

npmjs.com (public repo)

-g (global option) installs in node folder (for cmd line tools)
npx (for one time usage) installs in node folder and deleted
update (@ to specify ver)

ESLint/ Prettier/ JEST/ Babel

ESLint and Prettier make your code conform to standards
JEST is used to make test cases
Babel transpiles ES6 to ES5 (preset-env/ preset-react)

JS Memory  Handling

Creates Global Execution Context in Stack, which points to function objects in heap
Creates Function Execution Context when variables are defined/ called
=== / == https://medium.com/@diep.christopher/javascript-equality-comparison-under-the-hood-vs-54ae1c985970
shallow equal (default) vs deep equal (using lodash)
https://hashnode.com/post/does-javascript-use-stack-or-heap-for-memory-allocation-or-both-cj5jl90xl01nh1twuv8ug0bjk

Let vs var

If let is defined after it’s called, you have a temporal dead zone.

this

does not follow the lexical scope rule (except in arrow functions)

 

Resources:

https://dev.to
NEWSLETTERS:
https://javascriptweekly.com
https://nodeweekly.com
https://reactstatuscode.com

Leave a comment

Design a site like this with WordPress.com
Get started