SAShivanshu Agrawalintech-blogs-shivanshu.hashnode.dev·May 7 · 4 min readFlattening an Array in JavaScriptAfter coming back from sabzi mandi. You have one massive jhola (cloth bag). You look inside, and there is a plastic bag of potatoes. Dig deeper, and inside a bag of dhaniya, the vendor had put packet 00
SAShivanshu Agrawalintech-blogs-shivanshu.hashnode.dev·May 7 · 4 min readJavaScript Modules: Organizing code is exactly like organizing a big, traditional Indian wedding. If you try to make one person handle catering, DJ, panditji , and flower decorations all at once, you get absolute chaos—a00
SAShivanshu Agrawalintech-blogs-shivanshu.hashnode.dev·Apr 20 · 5 min readAsync Code in Node.js : Callbacks and PromisesIf once you wrote a Node.js application you have obviously got into asynchronous code. But why is it designed this way and how did we evolve from the "callback hell" to much cleaner world of Promises?00
SAShivanshu Agrawalintech-blogs-shivanshu.hashnode.dev·Apr 19 · 3 min readSetting up First Node.js ApplicationWelcome to Node.js. If you have written JavaScript for web you already know the language. Node.js simply takes JavaScript out of browser and puts it right onto your computer. 1. Installing Node.js Whe00
SAShivanshu Agrawalintech-blogs-shivanshu.hashnode.dev·Apr 18 · 4 min readHow Node.js handles Multiple Requests with a Single ThreadNode.js is famous for running on a single thread yet it powers the most high traffic applications in the world like Netflix, Uber, and PayPal. If it only has one thread it should freeze when two users00