What's a Method in JavaScript?Posted February 2, 2021javascriptfunctionmethodStart discussionA method is a function that belongs to an object and executed with that object as a context. Continue reading ➞
array.sort() Does Not Simply Sort Numbers in JavaScriptPosted January 26, 2021javascriptarraynumbersortStart discussionarray.sort() method, when invoked without arguments, doesn't sort numbers as you might expect. Continue reading ➞
How to Solve the Infinite Loop of React.useEffect()Updated February 26, 2023reacthookuseeffectStart discussionBe careful when using React.useEffect() hook because it can generate infinite loops. Continue reading ➞
The New Array Method You'll Enjoy: array.at(index)Posted January 12, 2021javascriptarrayStart discussionarray.at(index) method in JavaScript accesses array items at positive and (finally!) at negative indexes. Continue reading ➞
What's the Difference between DOM Node and Element?Posted January 5, 2021domnodeelementStart discussionWhat's the difference between a DOM node and an element? Let's find out! Continue reading ➞
Why Promises Are Faster Than setTimeout()?Posted December 29, 2020javascriptpromiseevent loopStart discussionWhy an immidiately resolved promise is faster then an immediate timeout? Continue reading ➞
Everything About Callback Functions in JavaScriptPosted December 22, 2020javascriptfunctionStart discussionThe callback is a function being called by another function, either synchronously or asynchronously. Continue reading ➞
How React Updates StatePosted December 15, 2020reacthookusestateStart discussionIf you're updating the state of a React component, expect the state variable to receive the new value on the next rendering. Continue reading ➞
5 Mistakes to Avoid When Using React HooksUpdated September 6, 2021reacthookuseeffectusestateStart discussionCommon mistakes and anti-patterns to avoid when using React hooks. Continue reading ➞
5 Best Practices to Write Quality JavaScript VariablesPosted December 1, 2020javascriptvariableclean codeStart discussion5 best practices on how to write quality JavaScript variables: prefer const, minimize scope, close to use place, and more. Continue reading ➞