Map and Set in ES6

Map and Set in ES6 1,Map Map objects are stored as key value pairs, and their keys and values can be of any type Creation of Map // Create an empty Map   let map  = new Map();   //Use a two-dimensional array to create a non empty Map   let map2 = new Map([       ["name","Li Si"],       ["age",12],       [{},123],       [12,8]   ]);   ...

Posted by n14charlie on Sat, 16 Oct 2021 05:06:11 +0200

Practical course of medical beauty applet

catalogue 01 demand analysis 02 introduction to navigation bar components Last review In the previous article, we introduced how to use the navigation component and how to create variables. In this article, we began to read the code of the official template to consolidate the front-end basic knowledge in the form of dismantling technical poi ...

Posted by jimlawrnc on Fri, 15 Oct 2021 01:29:33 +0200

Front end 15 elegant JavaScript skills

1. Conditionally add attributes to objects We can use the expansion symbol (...) to conditionally and quickly add properties to JS objects. const condition = true; const person = { id: 1, name: 'John Doe', ...(condition && { age: 16 }), }; If the value of each operand is   true, then  &&  Operator returns ...

Posted by jennatar77 on Wed, 13 Oct 2021 03:02:43 +0200

❗ Summary of three common ways to introduce JavaScript into HTML ❗

introduction JavaScript is a scripting language. Although there is Java in its name, it has nothing to do with Java. Its original name was LiveScript; The current front-end JavaScript is very popular, but the blogger himself is not ready to develop to the front-end, but he must understand some basic knowledge of the front-end; Last blog: ❗ Sum ...

Posted by thor erik on Wed, 13 Oct 2021 01:50:50 +0200

JS interview question notes 6-Web API

JS basics, specifying syntax (ECMA 262 standard)JS Web API, API for web page operation (W3C standard)The former is the basis of the latter, and the combination of the two can be really applied in practicecontain DOMBOMEvent bindingajaxstorage DOM DOM essence "Tree" (data structure) parsed from HTML file DO ...

Posted by ciciep on Tue, 12 Oct 2021 06:11:18 +0200

On cross domain vulnerabilities of JSONP

On cross domain vulnerabilities of JSONP CSRF (Cross site request forgery) is an attack method that hijacks the user to perform unintentional operations on the currently logged in Web application. Compared with XSS, XSS uses the trust of the website to the user, and CSRF uses the trust of the website to the user's Web browser. When it comes t ...

Posted by ash4u on Tue, 12 Oct 2021 02:12:01 +0200

JavaScript ES6 Symbol ultimate tutorial

Today, let's learn the new primitive type Symbol of JavaScript. We can use Symbol to create a unique value as an object attribute or value, or modify the internal logic of JS language through Symbol's well-known. Create Symbol ES6 adds symbol as the original data type, and other original data types, such as number, boolean, null, undefined an ...

Posted by hax on Sun, 10 Oct 2021 13:38:03 +0200

Sorted out a series of JavaScript tree operation methods, without Baidu again and again

preface Data manipulation of tree structure is a necessary skill for a developer. In the actual business development, we will also encounter many tree structures, such as the most common regional tree, enterprise structure tree, school level organization tree and so on. The following is a series of operation methods about JavaScript tree. Com ...

Posted by sidsel on Sun, 10 Oct 2021 09:29:29 +0200

Sky mending SRC main domain name crawling

0x00 preparation Make up day accountPython 3 running environmentThird party libraries such as requests 0x01 process analysis Check the corresponding URL s of exclusive SRC, enterprise SRC and public SRC respectively, and it is found that there is no change. It is preliminarily judged that the website uses Ajax, that is, asynchronous JavaScri ...

Posted by Bunkermaster on Sun, 10 Oct 2021 04:54:59 +0200

vue performance optimization

preface This paper mainly records the common optimization skills in daily development. Mainly for version 2.x. Functional component Functional components are declared using functional fields. It has no data responsive data, this context, and no life cycle hook function. It only accepts a props. When a component of ordinary object type is ...

Posted by chrome29 on Sat, 09 Oct 2021 13:24:23 +0200