Posts

JavaScript Refresher and Detailed Study - Part 11

Last updated on 24 Oct 2026 Post series: Part 1 ,     Prev Part (10) ,     Post Series TOC Contents Generator functions and yield - function* fnName(){...} and yield <value> syntax Two-way yield is rarely used in modern JS apps; async/await has replaced use of two-way generators for writing asynchronous code that 'looks synchronous' for await...of loop and async generators are not commonly used in frontend apps, but are useful for massive or continuous data pipelines In modern React JS apps, app files are usually modules but some exception cases may need loading script(s) as global (not modules) In ReactJS apps, underlying bundlers like Webpack generate custom JS code to manage and load .js, .jsx and .ts files, and strip out import and export statements; Network efficiency is main advantage For small vanilla JS apps with one main app source file and possibly one service worker source file, global script is preferred o...