ES6 summary of important knowledge points

ES6 1 ES6 getting started Ruan Yifeng recommended books: https://es6.ruanyifeng.com/#docs/reference 1.1 INTRODUCTION ECMAScript standard is abbreviated as ES6, also known as ES2015. It stipulates that future ECMAScript standards are changed every year and are uniformly named by the year (June of each year) 1.2 block level scope Variables ...

Posted by Alka-Seltzer on Wed, 22 Sep 2021 14:36:43 +0200

ES6-Generator and Asynchronous Application

Introduction to Generator Functions Basic conceptsGrammatical understandingDefinition Formal UnderstandingBasic examples Association between Generator and iteratoryield statement Notes on using yield statementsComparison of yield and return statements yield*statement yield* +Generator function without returnyield* +Generator function w ...

Posted by devinemke on Sun, 12 Sep 2021 18:15:42 +0200

Try to implement a simple mvvm with Proxy

A brief overview of Proxy and Reflect Proxy can be understood as setting up a layer of "interception" before the target object, through which the external access to the object must first be intercepted, so it provides a mechanism to filter and rewrite the external access. The original mean ...

Posted by deadparrot on Fri, 19 Jun 2020 12:46:44 +0200

Abort signal: how to cancel asynchronous tasks in JavaScript

By Tomasz Jakut Crazy technology house Original text: ckeditor.com/blog/Aborti... No reprint without permission Sometimes it can be difficult to perform asynchronous tasks, especially when a specific programming language does not allow you to cancel operations that are not started by mistake or are no longer needed. Fortunately, ...

Posted by kustomjs on Mon, 06 Apr 2020 04:14:50 +0200

Using JavaScript script in Java

About Nashorn Nashorn is a javascript engine. Starting from JDK 1.8, nashorn replaced Rhino (JDK 1.6, JDK 1.7) as an embedded JavaScript engine of Java. Nashorn fully supports the ECMAScript 5.1 specification and some extensions. It uses new language features based on JSR 292, including invokedynamic introduced in JDK 7, to compile JavaScript i ...

Posted by jvalarta on Mon, 30 Mar 2020 16:46:52 +0200

How do I add latency to a JavaScript loop?

I want to add a delay / sleep in the while loop: I've tried this: alert('hi'); for(var start = 1; start < 10; start++) { setTimeout(function () { alert('hello'); }, 3000); } Only the first scenario is real: after display, alert('hi ') will wait for 3 seconds, then alert('hello') will be displayed, but then alert('hello ') w ...

Posted by MBK on Thu, 19 Mar 2020 15:52:12 +0100

ECMAscript Object Oriented Foundation

Object-oriented Encapsulation - the ability to store relevant information in objects Aggregation - The ability to store one object within another Inheritance - The ability of class properties and methods derived from another class (or classes) Polymorphism - The ability to write functions or meth ...

Posted by penguinboy on Sat, 14 Mar 2020 03:22:59 +0100

JavaScript function inheritance

With inheritance in ES6, you can use the extends keyword. But what we are talking about here is not this, but several ways of implementing inheritance before ES6. (I) prototype inheritance ECMAScript takes prototype chain as the main method to implement inheritance. The basic idea is to use prototypes to let a reference type inherit the propert ...

Posted by TimSawyers on Thu, 05 Dec 2019 03:36:47 +0100

Review notes on basic Javascript

Introduction to Javascript Basics First of all, we need to know the standards of web pages: HTML is the structure of a web page Css is the expression and beautification of web pages Javascript is the dynamic structure of web page, that is, behavior. This article briefly introduces1. Basic syntax of JS ...

Posted by wama_tech on Sun, 27 Oct 2019 10:39:33 +0100

ES New Proposal: Double Question Mark Operator

To ensure readability, this paper uses free translation instead of literal translation. To read more high-quality articles, stamp the GitHub blog, and over a hundred high-quality articles are waiting for you a year! This week, Daqian World has a draw with prizes: column "Hearing the Wind in the Left Ear" x3, technical book x5. Welcom ...

Posted by en on Tue, 27 Aug 2019 02:08:43 +0200