Table of Contents generated with DocToc
- JAVASCRIPT
- https://javascript.info/
- https://beginnerwebdev.com/
- https://www.java5cript.com/
- https://sulco.stackblitz.io/
- https://airbnb.io/javascript/
- https://vanillajstoolkit.com/
- https://wesbos.com/javascript
- https://learnjavascript.online/
- https://learnjavascript.online/
- https://www.w3schools.com/w3js/
- https://www.30secondsofcode.org/
- https://exploringjs.com/deep-js/
- https://learnvanillajs.com/roadmap/
- https://scrimba.com/learn/learnjavascript
- https://watchandcode.com/p/practical-javascript
- https://learn.co/courses/introduction-to-javascript
- https://addyosmani.com/resources/essentialjsdesignpatterns/book/#
- https://dev.to/rahxuls/the-ultimate-and-free-javascript-resources-278i
- https://github.com/andredesousa/javascript-unit-testing-best-practices
- https://github.com/goldbergyoni/javascript-testing-best-practices
- https://github.com/busypeoples/functional-programming-javascript
- https://github.com/leonardomso/33-js-concepts#5--vs--vs-typeof
- https://github.com/jamiebuilds/itsy-bitsy-data-structures
- https://github.com/javascript-tutorial/en.javascript.info
- https://github.com/MostlyAdequate/mostly-adequate-guide
- https://github.com/dwyl/Javascript-the-Good-Parts-notes
- https://github.com/ryanmcdermott/clean-code-javascript
- https://github.com/30-seconds/30-seconds-of-interviews
- https://github.com/nas5w/javascript-tips-and-tidbits
- https://github.com/lydiahallie/javascript-questions
- https://github.com/elsewhencode/project-guidelines
- https://github.com/trekhleb/javascript-algorithms
- https://github.com/Sairyss/domain-driven-hexagon
- https://github.com/30-seconds/30-seconds-of-code
- https://github.com/mgechev/javascript-algorithms
- https://github.com/getify/Functional-Light-JS
- https://github.com/leonardomso/33-js-concepts
- https://github.com/deepa314/JAVASCRIPT_NOTES
- https://github.com/getify/You-Dont-Know-JS
- https://github.com/twhite96/js-dev-reads
- https://github.com/serhiisol/awesome-js
- https://github.com/denysdovhan/wtfjs
- https://github.com/standard/standard
- https://1loc.dev
- https://devdocs.io
- https://codetogo.io
- https://devhints.io/lodash
- https://surma.github.io/underdash
- https://joshwcomeau.com/operator-lookup
- https://wweb.dev/resources/js-array-functions-cheatsheet
- https://wweb.dev/resources/js-object-functions-cheatsheet
- https://dev.to/carlillo/clean-code-applied-to-javascript-part-vii-practical-refactoring-example-ceaser-cipher-2397
- https://medium.com/better-programming/clean-code-applied-to-javascript-part-5-exceptions-d46e07691c19
- https://medium.com/better-programming/a-list-of-interesting-operators-in-javascript-22fdacfbbce9
- https://levelup.gitconnected.com/javascript-best-practices-functions-and-mutations-43d76e280cfe
- https://blog.bitsrc.io/11-javascript-utility-libraries-you-should-know-in-2018-3646fb31ade
- https://brianflove.com/2014/09/02/whats-the-double-exclamation-mark-for-in-javascript/
- https://thewebdev.info/2020/06/09/more-javascript-habits-we-can-follow/
- https://medium.com/trabe/using-switch-true-in-javascript-986e8ad8ae4f
- https://kriss.io/30-helpful-javascript-snippet-that-you-should-know/
- https://typeofnan.dev/10-javascript-quiz-questions-and-answers/
- https://github.com/lydiahallie/javascript-questions#readme
- https://www.javatpoint.com/static-vs-const-in-javascript
- https://codesource.io/javascript-design-patterns/
- https://tylermcginnis.com/ultimate-guide-to-execution-contexts-hoisting-scopes-and-closures-in-javascript/
- https://www.w3schools.com/js/js_hoisting.asp
Hoisting is JavaScript's default behavior of moving all declarations to the top of the current scope (to the top of the current script or the current function).
- The call() allows for a function/method belonging to one object to be assigned and called for a different object.
- The apply() is very similar to call() but the apply method takes arguments as an array instead of separately.
- The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called. it is not necessary to pass the arguments at the time of
bind
. we can pass it later at the time of invocation.
- https://github.com/vercel/hazel
- https://github.com/evanw/esbuild
- https://github.com/webhintio/hint
- https://github.com/miragejs/miragejs
- https://github.com/lukeed/astray
- https://github.com/fkling/astexplorer
- https://github.com/pastelsky/bundlephobia
- https://github.com/lirantal/is-website-vulnerable
- https://github.com/Hopding/js-visualizer-9000-client
- https://github.com/electron-userland/electron-builder
- https://github.com/sindresorhus/awesome-electron
- https://github.com/TinkoffCreditSystems/tramvai
- https://github.com/rough-stuff/rough-notation
- https://github.com/bigskysoftware/htmx
- https://github.com/smallbets/userbase
- https://github.com/cyclejs/cyclejs
- https://github.com/remix-run/remix
- https://github.com/Tencent/omi
- https://github.com/kbrsh/moon
- https://electronjs.org/
- https://nwjs.io/
- https://nestjs.com/
- https://github.com/amark/gun
- https://github.com/expo/entity
- https://github.com/strapi/strapi
- https://github.com/kuzzleio/kuzzle
- https://github.com/xgenecloud/xgenecloud
- https://github.com/exportarts/bullmq-utils
- https://github.com/microsoft/FluidFramework
- https://dev.to/madza/73-awesome-npm-packages-for-productivity-19p8
- https://awesomeopensource.com/
- https://bestofjs.org/
- https://github.com/sverweij/dependency-cruiser
- https://github.com/siddharthkp/bundlesize
- https://github.com/developit/microbundle
- https://github.com/facebook/jscodeshift
- https://github.com/addyosmani/critical
- https://github.com/fkling/astexplorer
- https://github.com/smeijer/unimported
- https://github.com/NectarJS/nectarjs
- https://github.com/projen/projen
- https://github.com/vitejs/vite
- https://github.com/pubkey/rxdb
- https://github.com/typicode/lowdb
- https://github.com/pouchdb/pouchdb
- https://github.com/cdaringe/pouchy
- https://github.com/shikijs/twoslash
- https://github.com/redwoodjs/redwood
- https://github.com/juliancwirko/create-harold-app
- https://gist.github.com/jsonberry/c1f43140304a7aea529427568bcf1cb2
- https://gist.github.com/pomber/24b8286282ec10cc015a591d9f237b26
- https://github.com/JSMonk/hegel
- https://github.com/krisk/Fuse
- https://github.com/jonschlinkert/clone-deep
- https://github.com/EricSmekens/jsep
- https://github.com/kentcdodds/match-sorter
- https://github.com/blitz-js/superjson
- https://github.com/json5/json5
- https://github.com/wmertens/jsurl2
- https://github.com/nuxt-contrib/consola
- https://github.com/faisalman/ua-parser-js
- https://github.com/Jimbly/timezone-mock
- https://github.com/notifirehq/notifire
- https://github.com/uNmAnNeR/imaskjs
- https://github.com/Bogdan-Lyashenko/js-code-to-svg-flowchart
- https://github.com/dollarshaveclub/postmate
- https://github.com/BuilderIO/partytown
- https://github.com/petkaantonov/bluebird
- https://github.com/ajitid/fzf-for-js
- https://github.com/mwilliamson/mammoth.js
- https://github.com/freesoftwarefactory/parse-multipart
- https://github.com/vvo/javascript-library-template
- https://github.com/GoogleChromeLabs/estimator.dev
- https://github.com/stoeffel/awesome-fp-js
- https://github.com/sorrycc/awesome-javascript
- https://github.com/fengyuanchen/cropperjs
- https://github.com/stryker-mutator/stryker
- https://github.com/staltz/promisify-4loc
- https://github.com/gustf/js-levenshtein
- https://github.com/ajv-validator/ajv
- https://github.com/pshihn/rough
- https://github.com/ded/script.js
- https://github.com/ramda/ramda
- https://github.com/lodash/lodash
- https://github.com/jgranstrom/zipson
- https://github.com/getcrft/jsonizer
- https://github.com/danrevah/typeserializer
- https://github.com/danrevah/segal-decorators
- https://github.com/mgechev/data-adapter
- https://github.com/francisrstokes/super-expressive
- https://github.com/unshiftio/url-parse
- https://github.com/stalniy/casl
- https://github.com/nas5w/combinate
- https://github.com/vvo/tzdb/
- https://github.com/scurker/currency.js
- https://github.com/ajv-validator/ajv
- https://github.com/cabinjs/sensitive-fields
- https://github.com/country-regions/country-region-data
- https://github.com/niklasvh/html2canvas
- https://github.com/lukeed/clsx
- https://github.com/101arrowz/fflate
- https://github.com/crossfilter/crossfilter
- https://github.com/eligrey/l10n.js
- https://github.com/dcodeIO/bcrypt.js
- https://github.com/jhchen/fast-diff
- https://github.com/esfx/esfx
- https://github.com/yahoo/serialize-javascript
- https://github.com/naman03malhotra/match-rules
- https://github.com/bvaughn/js-search
- https://github.com/ansman/validate.js
- https://github.com/koorchik/js-validator-livr
- https://github.com/fingerprintjs/fingerprintjs
- https://github.com/arthurfiorette/tinylibs
- https://github.com/jekuer/add-to-calendar-button
- https://github.com/Unleash/unleash
- https://github.com/kach/nearley
- https://github.com/aui/art-template
- https://github.com/ezzabuzaid/tiny-injector
- https://github.com/mgechev/injection-js
- https://github.com/inversify/InversifyJS
- https://github.com/Livshitz/di.libx.js
- https://github.com/microsoft/tsyringe
- https://github.com/cleandi/cleandi
- https://github.com/developit/mitt
- https://github.com/iamkun/dayjs
- https://github.com/date-fns/date-fns
- https://github.com/xxczaki/light-date
- https://github.com/spencermountain/spacetime
- https://github.com/Essent/nativescript-xml2js
- https://github.com/fb55/htmlparser2
- https://github.com/xmldom/xmldom
- https://github.com/fb55/entities
- https://github.com/ai/nanoid
- https://github.com/ulid/javascript
- https://github.com/jedisct1/js-base64-ct
- https://github.com/crypto-browserify/sha.js
- https://github.com/boringdesigners/boring-avatars
- https://github.com/floating-ui/floating-ui
- https://github.com/shoelace-style/shoelace
- https://github.com/nolimits4web/atropos
- https://github.com/atomiks/floating-ui
- https://github.com/jeremyckahn/shifty
- https://github.com/junhoyeo/use-color
- https://github.com/joe223/tiny-swiper
- https://github.com/reach/observe-rect
- https://github.com/daybrush/selecto
- https://github.com/Splidejs/splide
- https://github.com/shikijs/shiki
- https://github.com/Qix-/color
- https://github.com/scottaohara/accessible_modal_window
- https://github.com/easylogic/codemirror-colorpicker
- https://github.com/OktaSecurityLabs/passprotect-js
- https://github.com/tradingview/lightweight-charts
- https://github.com/francoischalifour/medium-zoom
- https://github.com/davidjbradshaw/iframe-resizer
- https://github.com/steveruizok/perfect-freehand
- https://github.com/timruffles/mobile-drag-drop
- https://github.com/alias-rahil/handwritten.js
- https://github.com/colxi/css-global-variables
- https://github.com/davidmerfield/randomColor
- https://github.com/willmcpo/body-scroll-lock
- https://github.com/tuax/tua-body-scroll-lock
- https://github.com/willmendesneto/perf-marks
- https://github.com/metafizzy/infinite-scroll
- https://github.com/sindresorhus/clipboardy
- https://github.com/lucafalasco/scroll-snap
- https://github.com/zenorocha/clipboard.js
- https://github.com/pshihn/rough-notation
- https://github.com/giuseppeg/screensaver
- https://github.com/formkit/auto-animate
- https://github.com/codex-team/editor.js
- https://github.com/focus-trap/tabbable
- https://github.com/datalog/qrcode-svg
- https://github.com/Agezao/confetti-js
- https://github.com/mamunhpath/josh.js
- https://github.com/ueberdosis/tiptap
- https://github.com/jcubic/sysend.js
- https://github.com/joeattardi/picmo
- https://github.com/xtermjs/xterm.js
- https://github.com/taye/interact.js
- https://github.com/zxing-js/library
- https://github.com/Aaronius/penpal
- https://github.com/omrilotan/isbot
- https://github.com/Leaflet/Leaflet
- https://github.com/any86/any-touch
- https://github.com/matthewp/robot
- https://github.com/grid-js/gridjs
- https://github.com/immerjs/immer
- https://github.com/mikecao/umami
- https://github.com/angus-c/just
- https://github.com/xdan/jodit
- https://github.com/needim/noty
- https://github.com/gmrchk/blobity
- https://github.com/omgovich/colord
- https://github.com/Dogstudio/highway
- https://github.com/airbnb/lottie-web
- https://github.com/rikschennink/fitty
- https://github.com/wentin/underlineJS
- https://github.com/dixonandmoe/rellax
- https://github.com/wagerfield/parallax
- https://github.com/juliangarnier/anime
- https://github.com/cotton123236/zoomist
- https://github.com/alvarotrigo/fullpage.js
- https://github.com/michaelvillar/dynamics.js
- https://github.com/fast-average-color/fast-average-color
- https://github.com/francoischalifour/medium-zoom
- https://github.com/openseadragon/openseadragon
- https://github.com/steveruizok/perfect-arrows
- https://github.com/desandro/imagesloaded
- https://github.com/bubkoo/html-to-image
- https://github.com/team-video/tragopan
- https://github.com/google/model-viewer
- https://github.com/graphery/graphery
- https://github.com/nzbin/photoviewer
- https://github.com/transloadit/uppy
- https://github.com/aeroheim/midori
- https://github.com/markedjs/marked
- https://github.com/greensock/GSAP
- https://github.com/varkor/quiver
- https://github.com/oframe/ogl
- https://github.com/ct-js/ct-js
- https://github.com/aframevr/aframe
- https://github.com/mrdoob/three.js
- https://github.com/KhronosGroup/glTF
- https://github.com/theatre-js/theatre
- https://github.com/badzong/meshspin.js
- https://github.com/josdejong/mathjs
- https://github.com/stdlib-js/stdlib
- https://github.com/Jam3/math-as-code
- https://github.com/dinerojs/dinero.js
- https://github.com/ebradyjobory/finance.js
- https://github.com/TheAlgorithms/Javascript
- https://github.com/handsontable/hyperformula
- https://github.com/dcousens/haversine-distance
- https://github.com/Leonidas-from-XIV/node-xml2js
- https://github.com/pichillilorenzo/jackson-js
- https://github.com/ibmruntimes/yieldable-json
- https://github.com/francisrstokes/construct-js
- https://github.com/AsyncBanana/microdiff
- https://github.com/quicktype/quicktype
- https://github.com/calvintwr/issable
- https://github.com/parallax/jsPDF
- https://github.com/Hopding/pdf-lib
- https://github.com/bpampuch/pdfmake
- https://github.com/hand-dot/labelmake
- https://github.com/pdffillerjs/pdffiller
- https://github.com/simonhaenisch/md-to-pdf
- https://github.com/checkly/theheadless.dev
- https://github.com/checkly/headless-recorder
- https://github.com/GoogleChrome/puppeteer
- https://github.com/mrWh1te/Botmation
- https://github.com/segmentio/nightmare
- https://github.com/brix/crypto-js
- https://github.com/travist/jsencrypt
- https://github.com/paulmillr/scure-bip39
- https://github.com/paulmillr/noble-ed25519
- https://github.com/mgechev/mk.js
- https://github.com/olistic/warriorjs
- https://github.com/KilledByAPixel/LittleJS
A function can be created in 4 ways
👉function as a declaration 👉function as an expression 👉arrow function
- https://blog.bitsrc.io/understanding-javascript-mutation-and-pure-functions-7231cc2180d3
- https://hackernoon.com/javascript-and-functional-programming-pt-3-pure-functions-d572bb52e21c
- https://ultimatecourses.com/blog/all-about-immutable-arrays-and-objects-in-javascript
- https://dev.to/glebec/four-ways-to-immutability-in-javascript-3b3l
- https://www.samanthaming.com/tidbits/50-how-to-deep-clone-an-array/
-
use forEach/map/filter/reduce FIRST, only when there's an EXCEPTION do use a for loop. Exceptions include break (can't even remember the last time I used one) or async/await.
-
the best way to turn one Array into another is by using map. Array.map walks through each element in an Array, does something to that element, and gives you a new Array back containing the resulting elements. On the contrary forEach return void so if you modify the current element is doing a mutation on the array, it mutate the original array directly and thus is only the good approach for doing side effect such as writing the dom or doing an api call. You should not use it when you want to generate or build a value to keep using in your JavaScript code.
-
https://dev.to/ibrahima92/15-must-know-javascript-array-methods-in-2020-1kd8
-
https://medium.com/hackernoon/3-javascript-performance-mistakes-you-should-stop-doing-ebf84b9de951
-
https://medium.com/dailyjs/passing-arrays-as-function-arguments-c1f3644ecb9c
fill
pop
push
reverse
shift
sort
splice
unshift
reverse
An object can be created in 4 ways
👉using object literals => let newObject = {}; 👉using new or constructor => let newObject = new Object(); 👉using Object.create() => let newObject = Object.create( Object.prototype ); 👉using a class => let newObject = new User();
In plain English, an object literal is a comma-separated list of name-value pairs inside of curly braces. Those values can be properties and functions. Here’s a snippet of an object literal with one property and one function.
- https://medium.com/better-programming/object-literal-in-javascript-d3e0e7d58f3b
- https://ultimatecourses.com/blog/deprecating-the-switch-statement-for-object-literals
let greeting = {
fullname: "Michael Jackson",
greet: (message, name) => {
console.log(message + " " + name + "!!");
}
};
Scope determines the accessibility (visibility) of variables.
- Local scope: Variables declared within a JavaScript function, become LOCAL to the function. They can only be accessed from within the function. They are deleted when the function is completed. Variables declared with var and let are quite similar when declared inside a function. They will both have Function Scope.
- Global scope: A variable declared outside a function, becomes GLOBAL. A global variable has global scope: All scripts and functions on a web page can access it. Variables declared with var and let are quite similar when declared outside a block. They will both have Global Scope. In a web browser, global variables are deleted when you close the browser window (or tab).
- Block scope: Variables declared with let inside a block {} cannot be accessed from outside the block.
With JavaScript, the global scope is the complete JavaScript environment. In HTML, the global scope is the window object. All global variables belong to the window object.
All declarations, both functions and variables, are hoisted to the top of the containing scope, before any part of your code is executed.
- Functions are hoisted first, and then variables.
- Function declarations have priority over variable declarations, but not over variable assignments.
- IIFE
- Scope
- Hoisting
- Callstack
- Currying
- Callbacks
- Promises
- Closures
- Iterators
- Generators
- Async await
- Type coercion
- DOM Manipulation
- Prototype inheritance
- Understanding "this" keyword
- apply(), .call() and .bind()
- https://indepth.dev/observer-apis-in-javascript-part-i/
- https://indepth.dev/observer-apis-in-javascript-part-ii
Useful object methods: keys, values, and entries.
const data = {
name: 'Pierre',
age: 32
}
// Give me the keys in an array
Object.keys(data);
// ['name', 'age']
// Give me the values in an array
Object.values(data);
// ['Pierre', 32]
// Give me the keys and the values in an array (converts an object → array)
Object.entries(data)
// [['name', 'Pierre'], ['age', 32]]
// Give me the key-value pairs in an object. (converts an array → object)
const a = Object.entries(data);
// [['name', 'Pierre'], ['age', 32]]
const b = Object.fromEntries(data);
// { name: 'Pierre', age: 32 }
let promise = new Promise(function(resolve, reject) {
resolve(123); // immediately give the result: 123
});
- nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand. Best practices to use it instead of (||) to provide default value because of the fasly potential issue (eg. '' or 0).
- logical nullish assignment (x ??= y) operator only assigns if x is nullish (null or undefined).
- logical OR assignment (x ||= y) operator only assigns if x is falsy.
- optional chaining operator (?.) permits reading the value of a property located deep within a chain of connected objects without having to expressly validate that each reference in the chain. Instead of causing an error if a reference is nullish (null or undefined), the expression short-circuits with a return value of undefined.
- typeof operator returns a string indicating the type of the unevaluated operand
- non-null assertion operator (myExpr!;) tell the Typescript compiler explicitly that an expression has value other than null or undefined