Web front end Foundation (10):JavaScript

1. Pseudo array arguments Arguments represent arguments. One particular thing is that arguments are only used in functions. 1.1 number of return parameters Return the number of function arguments: arguments.length Example: fn(2,4); fn(2,4,6); fn(2,4,6,8); function fn(a,b,c) { console.log(arguments); console.log(fn.length); //G ...

Posted by devdavad on Mon, 18 Nov 2019 01:05:35 -0800

Foundation of Web front end: JavaScript

1. Common built-in objects The so-called built-in objects are some objects provided by ECMAScript. We know that all objects have corresponding properties and methods. 1.1 Array 1.1.1 array creation method Create in a literal way (recommended). var colors = ['red','color','yellow']; Use the constructor (later on) to create, and use the new key ...

Posted by ppera on Sun, 17 Nov 2019 22:46:38 -0800

Cook a delicious CLI

At the beginning, I really want to write a recipe, because of the limited cooking ability, so the title is a lie, ha ha^_~ Today, let's talk about the development of command-line tools (CLI: command-line interface, which will replace the long command-line tool terms with CLI). After reading this article, you will have a more comprehensive un ...

Posted by buducom on Fri, 01 Nov 2019 05:32:51 -0700

[THE LAST TIME] all knowledge points related to JS prototype

Preface The last time, I have learned [THE LAST TIME] has always been a series that I want to write, aiming to build up and review the front end. It is also to check and fill in the gaps and share the technology. Welcome to comment on Tucao. A series of articles are first listed in the public address [full stack front end]. The author's collec ...

Posted by the_manic_mouse on Wed, 30 Oct 2019 20:23:25 -0700

Powerful JSON.STRINGIFY optional parameters

A very interesting question is brewing in my mind. I'll share it with you so that you can refer to it when you have problems. Let's see what's interesting about JSON.stringify(). const dude = { name: "Pawel", friends: ["Dan", "Pedro", "Mr Gregory"] }; const dudeStringified = JSON.stringify(dude); console.log(dudeStringified); // {"name":"P ...

Posted by roby2411 on Mon, 21 Oct 2019 07:36:24 -0700

Soft technology web class: JavaScript array

JavaScript arrays are used to store multiple values in a single variable. Example var cars = ["Saab", "Volvo", "BMW"]; What is an array? Arrays are special variables that can store more than one value at a time. If you have a list of items (for example, a list of car brands), storing car brands in a single variable should look like t ...

Posted by shaun112 on Mon, 14 Oct 2019 19:07:10 -0700

Understanding JavaScript function calls and this

Links to the original text: Original link Over the years, I've seen a lot of confusion about JavaScript function calls. In particular, many people complain about the confusing semantics of this in function calls. In my opinion, many of these confusions can be eliminated by understanding the core function call statement and then looking at all o ...

Posted by morphius on Sat, 12 Oct 2019 01:24:36 -0700

AST abstract grammar tree learning

Reference AST and Front End EngineeringAST abstract grammar tree - the most basic key knowledge of javascript, 99% of people don't understand it at all13 examples Quick Start JS abstract syntax tree AST Explorer https://astexplorer.net/ concept JavaScript parsing: Lexical Analysis : convert the JavaScript code (char string) character str ...

Posted by zippee on Thu, 03 Oct 2019 09:30:54 -0700

web Front-end Getting Started to Practice: javaScript Data Types

ECMAScript variables contain values of two different data types: base type values and reference type values. Basic data types refer to simple data segments, while reference data types refer to pairs that may have multiple values. Basic type (value ...

Posted by axon on Tue, 10 Sep 2019 01:15:32 -0700

A Quick Interpretation of ES6's New Features

ECMAScript 2015 is an ECMAScript standard approved in June 2015. ES2015 is an important update of the language and the first major update of the language since ES5 standardization in 2009. These functions are now being implemented in major JavaScript engines. For the complete specification of ECMAScript 2015, please refer to the ES2015 standard ...

Posted by stangoe on Sun, 25 Aug 2019 08:07:24 -0700