useReducer finally makes senseโฆ because I built a project with it. ๐
React Quiz App + json-server fake API.
Hereโs what I learned ๐ https://t.co/CUyqzMhl87
๐ฅ๏ธ Computer And Programming Timeline
70s โ UNIX, C
80s โ DOS, C++
90s โ GUI, Java, Python
2000s โ Web + XP
2010s โ Mobile + AI
2020s โ AI + Cloud
๐ JavaScript Scopes & Closures in 1 tweet:
Global ๐ โ everywhere
Function ๐ง โ inside function
Block ๐งฑ โ inside { }
Lexical ๐งญ โ depends on where written
Closure ๐ โ function + remembered scope
Master these โ write cleaner JS ๐
#JavaScript#100DaysOfCode
๐ JavaScript for...x loops :
for (let i=0; i<3; i++) {} // counter loop
for (const i in arr) {} // keys / indexes
for (const v of arr) {} // values
โก Remember:
for โ count
for...in โ index
for...of โ value
๐ Easy rule: in = index, of = values
This bug wasted me hours ๐
Sharing so the next dev saves time.
If your React + Netlify site shows only a white screen,
๐ check _redirects and deploy settings first.
#React#Netlify#WebDev#Frontend