devsagarkumarjha.hashnode.devAlgorithm ShowdownShiksha, Deepak, and Sagar solved a coding assignment. Each used a different approach, and then Shiksha asked: Shiksha: “We solved the same problem in three different ways, but which one is the best?” Deepak: “Which one will be faster?” Sagar: “Faste...Sep 10, 2025·4 min read
devsagarkumarjha.hashnode.devArray.slice() and Array.splice()Array.slice(): The array.slice() method returns the selected elements starting at the given start argument and ends at the given optional end argument without including the last element. If you omit the second argument then it selects till the end. E...Aug 6, 2025·2 min read
devsagarkumarjha.hashnode.devJSON and its Common Operations✅ What is JSON? JSON (JavaScript Object Notation) is a lightweight data-interchange format that is: Easy for humans to read and write Easy for machines to parse and generate It is commonly used for: Data storage Data exchange between client and...Aug 6, 2025·3 min read
devsagarkumarjha.hashnode.devCall, Apply and BindThe call(), apply(), and bind() methods in JavaScript are all used to control the this context within functions. They allow you to explicitly set the value of this when calling or preparing to call a function. However, they differ in syntax and behav...Aug 5, 2025·2 min read
devsagarkumarjha.hashnode.devPrototype chainingPrototype chaining in JavaScript is a mechanism used to implement inheritance by linking objects through their prototypes. If a property or method is not found on an object, the JavaScript engine looks up the chain via the object's [[Prototype]] (acc...Aug 5, 2025·2 min read