Iterator summary

prefaceData traversal is a logic often used in our daily development. In addition to the most common for, while and forEach, iterators also provide an interface for data traversal. Understanding iterators will help us better deal with data.IteratorIterator is a new traversal mechanism introduced by ES6. Iterator has two core concepts:Iterator i ...

Added by walkonet on Sat, 26 Feb 2022 17:26:37 +0200

vue3 learning record I

Current version 3.2.25, official website address https://v3.cn.vuejs.org/guide install Import the latest version in the form of CDN package for development and use <script src="https://unpkg.com/vue@next"></script> npm installation # Latest stable version $ npm install vue@next # Single file component compilation plug-in $ npm ...

Added by s.steele on Sat, 26 Feb 2022 16:24:58 +0200

js event loop details

In js event loop, we need to distinguish the environment, because javascript can run in node environment and browser environment. So we summarize js event cycle from these two aspects. 1, js thread in browser Is the browser a process? Is there only one thread in it? At present, most browsers are actually multi process. When we open a tab page ...

Added by saito on Sat, 26 Feb 2022 15:53:03 +0200

vue life cycle

Each Vue instance will go through a series of initialization processes when it is created - for example, it needs to set data listening, compile templates, mount the instance to the DOM, and update the DOM when the data changes. At the same time, some functions called life cycle hooks will be run in this process, which gives users the opportuni ...

Added by icaro on Sat, 26 Feb 2022 14:04:48 +0200

Implementation and comparison of six common sorting algorithms

Having nothing to do, I wrote six common sorting algorithms and recorded my essays; 1. Bubble sorting Exchange sorting, compare two adjacent numbers, and move the small one forward, just like a bubble. Time complexity O(n^2), stable. const bubble_sort = function(arr){ const {length} = arr; for(let i = length - 1; i > 0; i --){ ...

Added by vanzkee on Sat, 26 Feb 2022 12:26:38 +0200

Introduction to string, array, date and other objects in js and common string methods and array methods

object Everything in JavaScript is an object: strings, numbers, arrays, dates, and so on. In JavaScript, an object is data that has properties and methods. Property is a value associated with an object. Methods are actions that can be performed on objects Keywords () For example: cars are objects in real life. Car properties: car.name=Fiat n ...

Added by Xiphoid8 on Sat, 26 Feb 2022 11:02:00 +0200

JavaScript regular expression

What is a regular expression? Regular expressions are objects that describe character patterns. Regular expressions are search patterns formed by a sequence of characters. Syntax of regular expression: / regular expression body / modifier (optional) For example: const exp = /abc/i /abc/i is a regular expression, where abc is a regular expre ...

Added by Sterculius on Sat, 26 Feb 2022 10:26:49 +0200

JavaScript of Javaweb part I (overall part I)

Generally speaking, javaweb has learned one article. At that time, I just took it over. I didn't practice some things myself and forgot many of them. So I'll review it quickly here. I won't review the contents of HTML and CSS here. I'll review it from JavaScript. 1. JavaScript introduction The birth of JavaScript language is mainly to complet ...

Added by trexx on Sat, 26 Feb 2022 10:01:51 +0200

2022 front end interview questions

catalogue 1 = = and = = = difference 2. What is the difference between $route and $route? 3 what is promise? 4 what is nested routing? 1 = = and = = = difference = = =: it is called the equivalent when the values on both sides type When the types are the same, the values are directly compared. If the types are different, false is dir ...

Added by Tilemachos on Sat, 26 Feb 2022 09:22:17 +0200

First day of javascript introduction

typora-copy-images-to: img Today's content JavaScript introduction Basic syntax of JavaScript JavaScript properties and text operations Dom operation of JavaScript I JavaScript introduction 1. JavaScript overview JavaScript is a client-side scripting language. It is an object-based and event driven client-side scripting language, wh ...

Added by ntbd on Sat, 26 Feb 2022 08:38:56 +0200