1. In the Try-catch statement, the finally clause is optional, and when the finally clause is included, the return statement in either the try or catch statement is ignored. So, when we use the finally clause, we need to be clear about how we want
Reference high-performance JavaScriptThe process of understanding that the browser UI thread is used to execute JavaScript and update the user interface is often referred to as the browser UI thread's working mechanism that can be understood as a
The DOM (Document Object model) depicts a hierarchical tree of nodes.1.1 Node typeThe node type can be divided into 12 types, all of which inherit from node type and share the same basic properties and methods. The main node types are the element
The splice function method in JavaScript is to remove one or more elements from an array, and if necessary, insert a new element at the location of the removed element, returning the element that was removed.Arrayobj.splice (Start, DeleteCount,
Way 1,splice
123
varary = [1,2,3,4];ary.splice(0,ary.length);console.log(ary); // 输出 [],空数组,即被清空了
Method 2,length is assigned a value of 0This is interesting, and other languages such as Java, whose array length is
The test function method in JavaScript is to return a Boolean value that indicates whether there is a pattern in the string being looked up. How to use:Rgexp.test (str)Where Rgexp is a required option. A regular expression object that contains a
Prototype chain:Object (constructor) object (Type (object))var o = {};alert (typeof O); // The result is Objectalert (typeof object); // The result is functionEach object has a property called __proto__ , which is the prototype of this
Many JS environments provide the ability to check the call stack. The call stack refers to the active function chain that is currently executing. In some old hosting environments, each arguments object contains two additional attributes:
The problem with global variables is that both your JavaScript application and all the code on the Web page share these global variables, and they live in the same global namespace, so naming conflicts are unavoidable when two different parts of the
A function is a convenient way to store code as a data structure that can be executed after the code. This makes it possible to abstract expressive higher-order functions such as map and foreach. It is also the core of the JS asynchronous I/O method.
An array of javascript
Learning Essentials:An Introduction to arraysDefining arraysArray elementsMethods of arraysFirst, the introduction of arraysThe element types in an array can be numeric, string, Boolean, and even an array.Second, define
Closures (closure) are a difficult and unique feature of the JavaScript language, and many advanced applications rely on closures.Here is my study note, which should be useful for JavaScript beginners.The scope of a variableTo understand closures,
JQuery SwipeWith jquery, you can create a sliding effect on an element.
Slidedown () Slide the element down.
Slideup () Slide the element up.
Slidetoggle () Toggles between the Slidedown () and the Slideup () method.
$ (selector)
JavaScript Date Object
Learning Essentials:Date ObjectConvert a Date object to a stringConverts a date and time in a Date object to a stringDate in Date ObjectTime in a Date objectSet a date in a Date objectSet the time in a Date
Reference high-performance JavaScriptThe For in Loop uses it to iterate over the object's property name, but each time the operation searches for an instance or a prototype's properties, causing more overhead to traverse with forThe book mentions do
js method and attribute value is a function, like a thing two kinds of address, such as potatoes, also called potatoes, a kind. As such, it is possible to extract the object's method as a function and then pass the extracted function directly to the
CSS structure pseudo Class E: first-child/last-child/only-child/empty,
E: first-child explanation: the first child element of E's parent element is exactly E. Define the style for E.
E: last-child explanation: the last sub-element of the parent
Summary of CSS advanced skills and css skills
When we write code at ordinary times, we do not have any CSS skills? Today I will share with you a summary of CSS advanced skills to make your code concise and efficient. You must master these tips to
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service