Articles under the 'JavaScript' tag

What is an event loop in JavaScript ?

What is an event loop in JavaScript ?Synchronize and AsynchronousSynchronize:Execute in orderAsynchronous:Execute a part first, wait for the result and then execute the subsequent code 1.setTimeout 2.Ajax 3.IO After the synchronous program is executed, execute the asynchronous program Single Threa ... More >>

Do you really understand babel-polyfill?

babel only does syntax conversion for JS syntax, but not for new JS APIs, such as Map, Set, Promise and other global objects. babel cannot convert methods on global objects, such as the new ES6 Array.find method 1. targets ... More >>

Analysis of front-end variables to enhance var, let

Let's start with a question to warm up var a = 12, b = 13, c = 14; function fn(a) { console.log(a, b, c); var b = c = a = 20; console.log(a, b, b) } fn(a); console.log(a, b, c) What the answer is will not be published first, but first we need to kno ... More >>

There are security issues with code written this way !

JavaScript prototypes are known and used by many people, but many people use prototype inheritance in the security problems caused by few people know, next we will understand it well. In real development, we often use property accessors in our code and use user input parameters to access the ... More >>

JavaScript Memory Management: How to Avoid Common Memory Leaks and Improve Performance

IntroductionAs a web developer, did you know that every line of code you write has an impact on the performance of your application? When it comes to JavaScript, one of the most important areas to focus on is memory management. Think about it: every time a user interacts with your site, they create ... More >>