A. Es6 grammar
http://es6.ruanyifeng.com/
What is ECMAScript, and the birth of es6? In ECMAScript 1997 1.0 was born in December 1999 ECMAScript 3 .0 was born, it was a huge success, the industry has been widely supported, it laid the basic grammar of JS is fully inherited later version.
Until today, we start learning JS, in fact, in grammar school version 3.0 in 2000 ECMAScript4.0 is the predecessor of the current ES6, but this version is so intense, to do a thorough ES3 upgrade, they do is "harmony" December 2009, ECMAScript5.0 version of the official release. ECMA Group of Experts is expected to be the fifth edition of ECMAScript 2018 as a mainstream development standards in mid-2013. June 2011,
ES5.1 release, and become the international standard ISO 2013, draft ES6 frozen, no longer adding new features, new features will be put in ES7; June 2015, ES6 formally adopted as international standards good, introduce birth es6, we simple syntax to learn a few es6, but only to the back of our vue course preparation to do before class. If interested students can view
https://www.cnblogs.com/majj/p/9041582.html ES6 basic syntax
https://www.cnblogs.com/haiyan123/p/8361470.html ES6 basic syntax
对象的单体模式 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <script>var person = { name:'张三', 属性 age: 18, fav(){ 方法 console.log(this,"111111111111"); </ HTML> </ body></ Script> Person.fav (); call the method } }
Object-oriented and ES6 JavaScript
https://www.cnblogs.com/chaixiaozhi/p/8515087.html JavaScript Object Oriented (inheritance in several ways)
https://www.cnblogs.com/shizk/p/9561997.html javaScript for what an object is? (One)
<! DOCTYPE HTML> <HTML lang = "EN"> <head> <Meta charset = "UTF-. 8"> <Meta name = "the viewport" Content = "width = Device-width, Initial-Scale = 1.0"> < HTTP-equiv = Meta "X--the UA-Compatible" Content = "IE = Edge"> <title> the Document </ title> </ head> <body> <Script> JavaScript constructor uses object-oriented // constructor manner Create Object function Animal (name, Age) { the this .name = name; initialization attribute the this .age = Age; } // Add to the above method constructor Animal.prototype.showName = function(){ console.log(this.name); } // to the constructor method of adding the above Animal.prototype.showName2 = function () { the console.log ( the this .name); } // to the constructor method of adding the above Animal.prototype.showName3 = function () { the console.log ( the this .name); } // Add to the above method constructor Animal.prototype.showName4 = function () { the console.log ( the this .name); } // to add the above constructor creates an instance var Dog = new new Animal ( 'day days', 18 is ) the console.log ("************************************************* ******************************** " ) for ES6 using the object (constructor function) for class Animal { constructor (name, Age) { the this .name = name; initialization attribute the this .age = Age; } // methods showname () { // must not comma the console.log ( the this .name) } } var D = new new Animal ( 'John Doe ', 19); // instance object d.showName (); </ Script> </ body> </ HTML>
Splice template string
<! DOCTYPE HTML> <HTML lang = "EN"> <head> <Meta charset = "UTF-. 8"> <Meta name = "the viewport" Content = "width = width-Device, Initial-Scale = 1.0 "> <Meta HTTP-equiv =" X--the UA-Compatible "Content =" IE = Edge "> <title> the Document </ title> </ head> <body> <Script> var A =. 1 ; var B = 2 ; // var STR = "ha ha" + a + "Hey Hey" + B; var STR = `ha ha $ {a} {B} Hey hey` $; the console.log (STR); </ Script> </ body> <
01-let and const
<! DOCTYPE HTML> <HTML lang = "EN"> <head> <Meta charset = "UTF-. 8"> <Meta name = "the viewport" Content = "width = Device-width, Initial-Scale = 1.0 "> <Meta HTTP-equiv =" X--the UA-Compatible "Content =" IE = Edge "> <title> the Document </ title> </ head> <body> <Script type =" text / JavaScript "> // let declarations variable block-level scope, not repeat statements // variable declaration is let block-level scope, not repeat statements // { // // let a = 12 is; // let = 12 is a; // let a = 13;// }// console.log(a);// var a = [];// for (the let I = 0; I <10; I ++) { // A [I] = function () { // the console.log (I); // }; // } // A [. 6] (); // 610 // variable does not exist lifting the console.log (foo); // output undefined var foo = 2 ; // const declare constants, once declared immediately initialized, not repeat statements. </ Script> </ body> </ HTML>
Two .VUE. Introduction Framework
First, what is VUE?
It is to build the user interface JavaScript framework (it automatically generates js, css, html, etc.)