jaspreet-sharma.hashnode.devControl Flow in JavaScript: If, Else, and Switch ExplainedControl Flow Control flow is the order in which JavaScript executes the code. JavaScript executes code line by line. But what if we want to change the control flow. What if we want to run a specific c2d ago·3 min read
jaspreet-sharma.hashnode.devArrow Functions in JavaScript: A Simpler Way to Write FunctionsWhat are Functions in JavaScript? Every textbook definition: Functions are reusable piece of code. Is it wrong? No. But it is boring. So how to visualize functions? Easy. Just look around in your room2d ago·3 min read
jaspreet-sharma.hashnode.devArray Methods You Must KnowArray() const threeEmptySeats = Array(undefined); console.log(threeEmptySeats); // [undefined] Stores the arguments inside an array if multiple or non-number Creates an array of N empty slots if o5d ago·13 min read
jaspreet-sharma.hashnode.devPromises CombinatorsPromise.all() const allPromise = Promise.all([Promise.resolve("Hello"), Promise.resolve("Hi"), Promise.resolve("How are you?")]); console.log(allPromise); // Promise {} allPromise.then(console.log)5d ago·4 min read
jaspreet-sharma.hashnode.devCompiler DesignFirst of all, what is a compiler? Why do we need a compiler? How compilers work? How to make our own compiler? What is a Compiler? A compiler is a system software program that translates high level prFeb 22·7 min read