Posts

JavaScript Refresher and Detailed Study - Part 6

Last updated on 3 Oct 2026 Post series: Part 1 ,     Prev Part (5) ,     Next Part (7) ,     Post Series TOC Contents setTimeout automatically cleans up after itself the moment it finishes executing; clearTimeout is needed only to stop it before its timer runs out Nested setTimeout: Differences between a browser's execution environment and Node.js's backend event loop 'Output every second' exercise using setTimeout and setInterval caching decorator pattern which is referred to in modern JS as memoization Function object call and apply methods to specify 'this' passed to a called function Method borrowing for the arguments object is obsolete in modern JS Similar consecutive lines using ... operator but one is rest operator and another is spread operator apply is slightly more efficient than call in one scenario related to elimination of middle unpack/repack cycle return func.apply(this, args); acts a...