Understanding Time complexity - Big O NotationsBig O Notations Lately, I have gotten an interest in algorithms, the first one I chose to understand deeply is how sorting algorithms work and their time complexity. However, this post is not to explain sorting algorithms, instead, we will take a ste...Jun 19, 2025·4 min read
Debounce and ThrottlingQuestion : How does the JavaScript code implement debounce functionality for button clicks? Explanation: The JavaScript code uses lodash's _.debounce function to create a debounced version of a callback function. It tracks the number of times a butto...May 2, 2024·3 min read
Javascript Conditional Statements with Some ExamplesDriving License Eligibility Check: let age = 18; let testPassed = true; if (age >= 18) { if (testPassed) { console.log("Congratulations! You are eligible and have obtained the license."); } else { console.log("Sorry, you did...Apr 14, 2024·1 min read
Email Verification in Javascript// Email Varification // Input an Email // Length of the email > 11 // after . only 2 or 3 characters allowed // minimum 3 characters between @ and . const email = prompt("Enter the email address"); const emailLen = email.length; const dotIndex = e...Apr 14, 2024·2 min read
Currying in JavascriptCurrying is a technique in functional programming where a function with multiple arguments is transformed into a sequence of functions, each taking a single argument. This improves composability and allows partial application of functions. function ...Apr 14, 2024·3 min read
Closure in JavascriptClosure Scope Chain Closure scope chain refers to the hierarchy of nested functions and their respective scopes that closures have access to. The sum function creates nested closures, allowing access to variables like a, b, c, d, and e from different...Apr 14, 2024·4 min read
Functions in JavascriptFunction Expression: A function expression in JavaScript is when you assign a function to a variable. It's an alternative way to define a function compared to the traditional function declaration. In your example: const square = function(num) { r...Apr 10, 2024·3 min read