Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点滴记录(es6) #2

Open
jindada opened this issue Jun 8, 2017 · 0 comments
Open

点滴记录(es6) #2

jindada opened this issue Jun 8, 2017 · 0 comments

Comments

@jindada
Copy link
Owner

jindada commented Jun 8, 2017

1 . import 引入的对象是 read-only

a.js

export const a = 1;
export let b = 2

index.js

import {a, b} from './a';
a = '123';   // Module build failed: SyntaxError: "a" is read-only
b = '123';   // Module build failed: SyntaxError: "b" is read-only

2 . 新的原始数据类型 Symbol

ES6 引入了一种新的原始数据类型 Symbol,表示独一无二的值
它是 JavaScript 语言的第七种数据类型,前六种是:undefined、null、布尔值(Boolean)、字符串(String)、数值(Number)、对象(Object)

3 . 箭头函数不能用作 Generator 函数

@jindada jindada changed the title 那些不能说的秘密 儿时 那些不能说的秘密 es6篇 Jun 8, 2017
@jindada jindada changed the title 那些不能说的秘密 es6篇 点滴记录(es6) Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant