This article focuses on the study notes of JavaScript data types. For more information, see five simple data types in ECMAscript, also known as basic data types: undefined, Null, Boolean, Number, and String. There is also a complex data type-Object.
It is easy to make minor mistakes in 10 JavaScript codes! Today, JavaScript has become the core of web page editing. Especially in the past few years, the Internet has witnessed the emergence of a large number of JS libraries in SPA development,
Today, we will analyze these 5 topics in detail and hope to help you.Note:The problem comes from the famous front-end architect Baranovskiy's post, "So, what think you know JavaScript? " 》。The answer is also from the famous JS bull Nicholas C. Zakas'
Javascript (1) Summary of javascript Array usage (1)
/* 1. The js array, like the arrays in other languages, is an ordered list of data, but the difference is that each item of the js array can save any type of data. In addition, the js array size
JavaScript learning Notes: Data Types and javascript learning notes
I. Classification
Basic data types: undefined, null, string, Boolean, and number
Complex data type: object
Object Attributes are defined in the form of unordered names and value
JavaScript learning notes operator (continued), javascript learning notes
I. Multiplication Operators
1. Multiplication :*
Special rules for multiplication operators:
If the operands are all numeric values, they are calculated by regular
JQuery. trim () function and trim () Usage Details, jquery. trimtrim
The jQuery. trim () function removes spaces at both ends of a string. This function can remove the white spaces at the start and end of the string (until the first non-white string
Difference between document. forms [0] And getElementByName in JavaScript, getelementbyid
First, let's look at an example:
Copy codeThe Code is as follows: testtest testtest testtest
When document. forms [0] has one or more form forms in the HTML
Usage of the keyword in JavaScript:
The for-in loop should be used to traverse non-array objects. the for-in loop is also called "enumeration ".
Array elements are iterated but not recommended, because the order cannot be ensured. If an attribute is
There are three main methodsConversion functions, forced type conversion, and weak type conversion using js variables.1. conversion functions:Js provides two conversion functions: parseInt () and parseFloat. The former converts the value to an
This is a must for every person who wants to learn JavaScript in depth, I have read a lot of books for this, although I have a certain understanding of this and often use this, but if someone asked me this is what ah? I still can't give someone a
1, switch uses the strict equality operator 2, break and continue have jump action, break statement out of the loop, continue used to immediately terminate this round cycle, return to the head of the loop structure, the next round to start the Cycle.
Arrays in JavaScriptfirst, the definition of the arrayAn array is an ordered collection of values, or an array is an ordered list of Data.second, Create an array" literal form "1. empty Arrayvar arr=[];2 . Array with elementsvar arr=[1,2,3,1,2];3,
This article will answer the last question about pseudo arrays mentioned in the general circular Traversal method forEach in javascript.What is a pseudo array?You can use Array. prototype. slice to convert an object with the length attribute to a
Summary of JS strict mode knowledge points and js knowledge points
The so-called strict mode is actually a string that does not assign a value to any variable "use strict"
If this prompt is displayed in the global scope, the entire script will adopt
Vue's author announced---Stop updating the vue-resource after the release of vue2.0, it is recommended to use AxiosI used it a while ago, and now I'm talking about its basic usage.I. Preparation phase----If you're just a front end that doesn't write
Number () encounters null is converted to 0, and Underfind is converted to Nan.General integers are converted to Nan by using the parseint () method, which encounters a null. (Note the difference) The method can set the second parameter parseint
Call methodSyntax: Call ([thisobj[,arg1[, arg2[, [,. ArgN]]])Approximate wording: Call (object,arg1,arg2,...);Definition: Invokes one method of an object, replacing the current object with another object.DescriptionThe call method can be used to
In the company newly learned a page adaptive way://equal ratio scaling!(function (Doc, win) {varTimer, Docele= Doc.documentelement,//Get BodyEVT ="Onorientationchange" inchWindow?"Orientationchange":"Resize",//Get phone rotation eventsSetfontsize
Conversion methodAs mentioned earlier, all objects have tolocalestring (), toString (), and valueof () methods. Where the ToString () method of the call array returns a comma-delimited string that is stitched together as a string of each value in
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.