Arama Sonuçları: "#JSbytes"

13 sonuç
nikhiL Nandeshwar
nikhiL Nandeshwar@I_found_myself_·
Day 17 of #LearnJSwithMe Every beginner's mistake : using the global scope like a junk drawer. Wrap your code in functions or modules. Globals don't just clutter, they haunt. #jsbytes
English
0
0
2
17
nikhiL Nandeshwar
nikhiL Nandeshwar@I_found_myself_·
PRO TIP - If you’re ever confused about what this refers to - just console.log(this) inside your function. It'll tell you the truth faster than any tutorial 😄 #LearnJSWithMe #JavaScript #JSbytes
English
0
0
2
15
nikhiL Nandeshwar
nikhiL Nandeshwar@I_found_myself_·
Day 16 of #LearnJSWithMe 'this' Keyword (Confusing but easy too.. 🙂) 'this' depends on how you call the function, not where it’s written. Arrow functions don’t have their own this, they use parent scope. Regular functions bind dynamically. That’s the whole secret. #JSbytes
English
1
0
2
27
nikhiL Nandeshwar
nikhiL Nandeshwar@I_found_myself_·
Day 15 of #LearnJSWithMe Shallow vs Deep Copy = copies reference ❌ Spread copies shallow ✅ structuredClone() copies deep ✅ const copy = structuredClone(obj); Know what you’re copying, or bugs will copy you 😅 #JSbytes #LearnJS #TechTips
English
0
0
4
38
nikhiL Nandeshwar
nikhiL Nandeshwar@I_found_myself_·
Day 14 of #LearnJSWithMe Debounce (Real UI Magic) - Debouncing prevents spam calls (like search input on every keystroke). function debounce(fn, delay){ let t; return (...a)=>{ clearTimeout(t); t=setTimeout(()=>fn(...a), delay); } } Cleaner UI. Faster apps #JSbytes
English
0
0
1
35
nikhiL Nandeshwar
nikhiL Nandeshwar@I_found_myself_·
Day 13 of #LearnJSWithMe Event Loop (Understanding async) - JS is single-threaded, but async feels magical because of the Event Loop. Order of execution: 1) Call stack 2) Microtasks (Promises) 3) Macrotasks (setTimeout) Master this = master async #JSbytes #JStips #TechTips
English
1
0
2
55
nikhiL Nandeshwar
nikhiL Nandeshwar@I_found_myself_·
Day 11 of #LearnJSWithMe Hoisting = JS moves declarations to the top. But remember: only declarations, not initializations. console.log(x); // undefined var x = 5; With let & const, you get a Temporal Dead Zone instead of silent bugs. #JSbytes #JSTips #LearnJS #TechNews
English
0
0
0
50
nikhiL Nandeshwar
nikhiL Nandeshwar@I_found_myself_·
Day 6 of #LearnJSWithMe The spread operator (...) makes copying & merging arrays/objects effortless. const nums = [1, 2, 3]; const copy = [...nums, 4, 5]; console.log(copy); // [1, 2, 3, 4, 5] Cleaner than concat() - and super handy for immutability! #LearnJS #JSbytes #JStips
English
0
0
0
48