The two objects that the client stores data are:Two objects are not used in any way, the only difference is the effective time of the stored data①localstorage-No time limit for data storage unless manually deleted, the data will remain in the local
First, introduce some basic knowledge that needs to be used."JSON"JSON is one of the most common data formats used in data interactions.Because different languages have different syntax, when you pass data, you can convert arrays, objects, and so on
FrontJS template engine has a lot of, I used to use art-template, and sometimes take Vue to use as a template engine.Until......At the beginning of the year, I was in the last project group, when the code specification was not allowed to use
(function () {Global attribute infinity means that the value of positive infinity is Nan means values that are not numeric undefined undefind value global function decodeURI () decoding using encodeURI () Escaped string decodeuricomponent ()
1. Add a new property to the array:1.1: Build an array first:var oldarr=[{name: ' li '},{name: ' Hi '},{name: ' Us '}1.2: Add a new property to this array in the method:function Looppushobj (Oldarr) {let arr=[]; if (oldarr&&oldarr.length>0) { for
Sum All Primes
1. Requirements
Sum of prime numbers less than or equal to a given number.
Only 1 and its own two approximate numbers are called prime numbers. For example, 2 is a prime number, because it can only be divisible by 1
How to create an array:1)Operation:1) Gets the number of members of the array:Aleart (Arr02.length)2) Popup array contents (PIN starting from 0)Aleart (Arr02[3])3) Connection string: Join ()var str1 = Arr02.join ("-")var str2 = Arr03.join ("")4) Add
First, IntroductionJavaScript is one of the most popular programming languages in the world, and the language is used primarily for HTML and WEB.JavaScript is a scripting language, a lightweight language, programming code that can insert HTML pages,
Spent about 3 days, understanding, understanding, reasoning KMP algorithm, here to do a summary! Hope to bring help to the people who see!!1. What is the KMP algorithm?In the method of finding pattern string pattern in the main string str, there is
Javascriptkey points of knowledge cardingone. Javascript Process Control
The data types commonly used in JS
Use of the VAR keyword
If–else If–else
Switch
While
For
two. Javascript Common Functions
1. String
In the premise does not know B in this array subscript, delete b this elementvar arrlist = [' A ', ' B ', ' C ', ' d ']; Arrlist.splice (Jquery.inarray (' B ', arrlist), 1);alert (arrlist);where Jquery.inarray (' B ', arrlist) is the position of
DNA Pairing1. Requirements
The DNA Strand lacks a paired base. Based on each base, the matching base is found, and the result is returned as a second array.
Base pairs (base pair) is a pair of at and CG that matches the missing base for
1. Understanding Arrays/ArrayStore a large push of data.Why use arrays: Store all the grades in the whole class."Note" There is the need to process bulk data of the same type, invent arrays, and store bulk data.Data type:= = Basic Data type: = =+ +
Jquery.makearray (obj) This function is easy to guess by name: it should be used to convert an incoming object into a native arrayTake a look at the official website's explanation:Convert an Array-like object into a true JavaScript array. (Convert
Array ObjectThe array object, like the list object inside Python, is an object that stores multiple object values, and the methods and properties are basically similar.First, the attributeLenghtSecond, the method1, concat () is used to connect two
1.1 Functions and objects 1. Defining a function in a way that defines a classTo define a method for a class: function Class1 () { // class member definition and constructor section }Class1 is both a function and a class.Use the new operator to
First, JavaScript introduction method1. Write code in script tag2. Introduction of additional JS filesSecond, JavaScript language specification1. CommentsThis is a single-line comment/*This is a multi-line comment*/2, TerminatorThe language in
Create an array
Merging two arrays-concat ()
Merging three arrays-concat ()
Make a string of elements of an array-join ()
Delete the last element of an array-pop ()
Add a new element to the end of the array-push ()
1. JavaScript overview
2. JavaScript Introduction method
3. JavaScript Language Specification
4. JavaScript Language Basics
5. JavaScript data type
6. JavaScript operators
7. JavaScript Process Control
8. JavaScript
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.