What is optional chaining?
Simple meaning
The question mark dot stops the lookup and returns undefined if the left side is null or undefined.
Open the full page for Why, Steps, Example and Key takeaway.
Panel-ready Frontend Master questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.
The question mark dot stops the lookup and returns undefined if the left side is null or undefined.
Open the full page for Why, Steps, Example and Key takeaway.
Document.cookie can set cookies the page can also read, so XSS can steal them.
Open the full page for Why, Steps, Example and Key takeaway.
If I add a window resize listener in useEffect and forget the cleanup, the handler keeps the component closure alive after unmount.
Open the full page for Why, Steps, Example and Key takeaway.
A generic is a type parameter so a function or component works with many shapes while keeping the relationship.
Open the full page for Why, Steps, Example and Key takeaway.
Slice returns a shallow copy of a portion and does not change the original, which is what I want in React.
Open the full page for Why, Steps, Example and Key takeaway.
JavaScript runs on one call stack.
Open the full page for Why, Steps, Example and Key takeaway.
Destructuring pulls values from arrays or objects into named variables in one line.
Open the full page for Why, Steps, Example and Key takeaway.
Spread copies array or object properties into a new literal.
Open the full page for Why, Steps, Example and Key takeaway.
It is the browser steps from HTML and CSS to first painted pixels: parse DOM, parse CSSOM, render tree, layout, paint.
Open the full page for Why, Steps, Example and Key takeaway.
Promise callbacks are microtasks and run before the next macrotask like setTimeout.
Open the full page for Why, Steps, Example and Key takeaway.