工具:
1.markdown——文档
Markdown Preview Plus
2.版本控制
共享协作、版本
svn git
存储 集中式 分布式
------------------------------------------------------------------------------
github
git clone 源地址 svn checkout
git commit -a -m "原因" svn commit=commit+push+add
git add 文件/目录
git push 推到服务器
git pull 更新到本地 svn update
------------------------------------------------------------------------------
ES6:最新版的JS
ECMAScript标准 JavaScript语言(实现)
ECMAScript6.0
ECMA6
ES6
------------------------------------------------------------------------------
ES6:
1.变量
var——重复定义不报错;没有块级作用域;不能限制修改
let 变量,不能重复定义,有块级作用域
const 常量,不能重复定义,有块级作用域
2.函数+参数
箭头函数——简写:
1.只有一个参数,()可以省
2.只有一个语句,还是return,{}可以省
参数扩展——剩余参数
展开数组
3.数组
map 映射 [31, 56, 89, 67] => [不及格, 不及格, 及格, 及格]
reduce 汇总 [..., ..., ...] => xx
filter 过滤 [x, x, x, x, x, x] => [x, x, x...]
forEach 迭代、遍历
4.字符串
字符串模板 "xxx" 'xxx' `x${变量}xx`
5.面向对象
class
super
extends
6.promise 解决异步
同步——只有操作完事了,才往下执行 一次只能做一个事儿
异步——这个操作进行中,其他操作也能开始 一次可以做多个事儿
异步的优势:
1.用户体验好
2.高效
同步的优势:
简单
异步:
$.ajax({
url: '/get_banners',
type: 'post',
dataType: 'json',
success(){
$.ajax({
url: '/get_hot',
type: 'post',
dataType: 'json',
success(){
$.ajax({
url: '/get_list',
type: 'post',
dataType: 'json',
success(){
$.ajax({
url: '/get_hot',
type: 'post',
dataType: 'json',
success(){
},
error(){
alert('读取失败');
}
})
},
error(){
alert('读取失败');
}
})
},
error(){
alert('读取失败');
}
})
},
error(){
alert('读取失败');
}
})
同步:
let banners=$.ajax('/get_banners');
let hot=$.ajax('/get_hot');
let list=$.ajax('/get_list');
let hot=$.ajax('/get_hot');
//创建Promise对象
let p=new Promise(function (resolve, reject){
异步代码...
});
//使用Promise对象
p.then(()=>{}, ()=>{});
7.generator
8.json
不兼容——高级浏览器,靠编译解决
------------------------------------------------------------------------------
读
https://gitee.com/oschina/git-osc/wikis/pages?title=License&parent=
1.Markdown——个人介绍
2.开源协议
3.codewars的地址
https://www.codewars.com/users/dancingblue
4.注册github账号
https://github.com/dancingblue
5.研究“如何用babel编译ES6”
------------------------------------------------------------------------------
ES6&7
模块化
网友评论