surya ravikumarsuryaravikumar.hashnode.dev·Mar 14, 2024"Understanding Polyfills: Bringing Modern JavaScript Functionality to Older Browsers"<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Polyfill Example</title> <link rel="stylesheet" href="styles.css"> </head> <body> <h1> "Understandi...Discusspolyfills
Tushar Khannacodertushar.hashnode.dev·Feb 16, 2024Learn Polyfill of JS Array Map with ChatGPTArray.prototype.myMap = function(callback) { const array = []; this.forEach((item, index) => { array.push(callback(item, index, this)); }); return array; } You can this code be made optimized & is prod ready? ChatGPT The code can be opti...DiscussJavaScript
Md Talhamdtalha.hashnode.dev·Feb 2, 2024Implementing Custom Promise.all() in JavaScriptPromises in JavaScript provide a powerful way to handle asynchronous operations. One commonly used utility function is Promise.all(), which allows you to execute multiple promises concurrently and wait for all of them to complete. In this blog post, ...DiscussJavaScript
Md Talhamdtalha.hashnode.dev·Jan 24, 2024Crafting a Custom Polyfill for Array.prototype.flat() in JavaScriptJavaScript's Array.prototype.flat() method is a powerful tool for flattening nested arrays, making it easier to work with complex data structures. However, not all environments may support this method, especially in older browsers. In this blog post,...DiscussJavaScript
Bharat Kumarbharat2044.hashnode.dev·Jan 17, 2024What is a Polyfill in JavaScript?A polyfill, in the context of JavaScript, is a piece of code (usually written in JavaScript) that provides functionality that is not natively supported by a web browser. The term "polyfill" is a combination of "poly," meaning many, and "fill," indica...Discusspolyfills
Komal Shevanejs-brains.hashnode.dev·Jan 12, 2024What is Polyfill? Make it for ForEachA Polyfill is a code in JS which is used to provide modern functionality on old browser which is not supported in old versions. Basically mimic the modern functionality with traditional code.For Example: forEach will not work in the older version of ...Discuss·3 likes·47 readsJavaScript
Gokul Pisharodygokulpisharody.hashnode.dev·Jan 9, 2024PolyfillforEach let arr = [1,2,3,4] arr.forEach((ele)=> console.log(ele)) //[1,2,3,4] Array.prototype.myForEach= function(cb){ //console.log(this) // [1,2,3,4] for(i=0;i<this.length;i++){ cb(this[i]) } } arr.myForEach((ele)=> console.l...DiscussJavaScript
Md Talhamdtalha.hashnode.dev·Jan 8, 2024Building a Custom JSON Stringify Function in JavaScriptJSON (JavaScript Object Notation) is a widely used data interchange format that allows easy data exchange between different programming languages. In JavaScript, the JSON.stringify() method is commonly used to convert JavaScript objects into JSON str...Discuss·1 like·33 readsJavaScript
Aman Singh TomarforAman Singh Tomarblog.amantomar.in·Dec 19, 2023Do you know Polyfills in Javascript?Hey there! If you’ve ever built a website or tinkered with some cool JavaScript features, you might have bumped into a little challenge: making sure your code understands and gets along with all the different web browsers out there. Luckily, that’s w...Discuss·1 like·40 readsJavascriptJavaScript
Yaseer Tasleemyaseer-tasleem.hashnode.dev·Dec 18, 2023Polyfill for Array map() Method in JavaScriptIntroduction JavaScript, a language of endless possibilities, offers a multitude of array methods to streamline your coding journey. One such powerhouse is the map() method, revered for transforming arrays with elegance. But what if you want to roll ...Discuss·10 likesJavaScript