Directory
A. JS Modular development
Two. js file for general packaging requirements
Three. Using Webpack to process JS files
3.1 Using Babel to convert es6+ syntax
3.2 Script Merge
3.3 Public Module
1,JS basic data types and reference types:(1) Basic data type: number,string,null,undefined,symbol--stack;(2) Reference data type: object,array,function--heap;The two data types are stored in different locations;1), the original data type is
To undertake the summary of the previous blog post, this blog post is the use of code + drawing form, combing the function scope and closure of the understanding.Scope in a function
In JavaScript, objects and functions are also variables.In
First, the concept of rapid sorting methodWe have a messy array for a quick sort, you can first from an array to take an intermediate value, an array is divided into 2, the left of the array with the median comparison, small on the left side, large
Today on the Internet to see a problem, I think it is very interesting to copy down the solution. The topic is this:1 functionParent () {2 This. A = 1;3 This. B = [1, 2, This. a];4 5 This.
Some of the areas where JavaScript is noted are:A. When you include an external JavaScript file, you must set the SRC attribute to the URL of the corresponding file. This file can be either a file on the same server as the page containing it, or a
The Web front end has three layers:
HTML: Describing the structure of a page from a semantic perspective
CSS: From an aesthetic perspective, describe the style (beautify the page)
JavaScript: Describing behavior from an interactive
Getting Started with JavaScriptJavaScript is a lightweight, interpreted web development language that is not very complex and easy to learn. Since all modern browsers are embedded in the JavaScript engine, JavaScript source code can be interpreted
Declaring an advance mechanismThere is a preprocessing mechanism in JavaScript where the browser, when parsing the JS code, promotes the variables declared by VAR and functions declared by the function to the top of the current scope. However, the
ECMAScriptJS Simple Introduction (the difference from Java)1. Syntax (case sensitive, weak type, semicolon writable, not writable)2. Variable (can only use the var definition, or not defined, if you use the var definition inside the function, then
What is a policy model?See Code Snippet 1 first.// 代码片段1var bonus = new Bonus();bonus.setSalary(10000);bonus.setStrategy(new performanceS());console.log('bounsS' ,bonus.getBonus());// => 40000bonus.setStrategy(new performanceA());console.log('bounsA'
Input parameters ' abc ', output all combinations [' abc ', ' ACB ', ' bac ', ' BCA ', ' cab ', ' CBA ']Ideas: Divided into 3 columns, the first column is a, b,c; the second list a,b,c out the first columns are selected, such as the first column
* PHP Shuffle scrambled array orderArray.prototype.shuffle = function () { "use strict"; var a = [], b = [], n = this.length, I, J, seq; @b:a[i] element exists? for (i = 0; i 0) { seq = Math.floor (3*this.length * math.random ());
1.JavaScript Window LocationThe Window.location object is used to obtain the address (URL) of the current page and redirect the browser to a new page.1.1 Window LocationThe window.location object can be written without using the window prefix. Some
The This of JavaScript is a pointer to a function that dynamically binds the object at runtime.The 4 common points of this are:Method invocation as an objectvar obj={ name:"Liakeobai", getName:function() { Console.log ( this = = = obj);
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