lochawala.comPromise.try(): The Game-Changer for Seamless Synchronous and Asynchronous JavaScriptJavaScript developers have long relied on Promises to manage asynchronous code smoothly—but what if you need to catch errors and results from both synchronous and asynchronous functions consistently? Enter Promise.try(), a brand-new addition official...Sep 24, 2025·3 min read
lochawala.comBeyond the Basics: A Deep Dive into the Advanced Features of JavaScriptAs you become more experienced with JavaScript, you may encounter some advanced topics that can help you create even more powerful and efficient code. Here are a few Javascript Topics that you must know Callback Functions Callback functions are fun...Apr 8, 2023·4 min read
lochawala.comRemove continuous elements from an arraylet's first understand what continuous element in the above example, you have seen there is a repeating now I want to remove all continuous values only (not duplication) and keep 1st element of each repeating value let's see how can we achieve that ...Jun 29, 2021·1 min read
lochawala.comCool math function shorthandpow ** exponentiation operator raising the first operand to the power of the second more details explanation click here floor ~~ double bitwise not operator rounding a number towards zero more details explanation click here Wrapping up! Share thi...Jun 21, 2021·1 min read
lochawala.comMost common javascript string functioncharAt charAt method returns the character at the specified index in a string charCodeAt charCodeAt method returns Unicode of the character at the specified index in a string substr substr extracts the characters from a string, beginning at a speci...Jun 12, 2021·1 min read