Amit Mehta·Aug 8, 2022How to Easily Add and Remove Any Elements from a JavaScript ArrayIn this post I want to discuss a super useful way to add and remove elements from ANY index in a javaScript array.
Amit Mehta·Aug 3, 2022How to Solve Palindrome Problem with 1 Line of JavaScriptUnless you’re just learning how to code now, you’ve probably heard of the famous valid palindrome or ‘is palindrome’ problem. It’s a common…
Amit Mehta·Jul 27, 2022How to Match a Phone Number with Regex and JavaScriptI’ll be honest, the first time I saw a regular expression, it was a scary experience. It looks like a weird alien language! I thought to…
Amit Mehta·Jul 22, 2022How to Crack the Staircase Problem with JavaScript using MemoizationI want to write a quick follow up to my last post on How to Solve the Staircase Problem with 5 Lines of JavaScript.
Amit Mehta·Jul 21, 2022Quick Way to Check if 2 Arrays are Equal in JavaScriptWhen learning JavaScript for the first time we’ve all done this…
Amit Mehta·Jul 21, 20224 Simple Ways to Covert a JavaScript String to a NumberHaving to check if a string is a number, and then type convert it to a number, comes up a lot when coding in JavaScript. If you’re done…
Amit Mehta·Jul 20, 2022How to Solve the Staircase Problem with Just 5 Lines of JavaScriptIf you’re new to algorithms and leetcode, the staircase problem is infamous!