楼主: Lisrelchen
5590 14

[ Deepak Grover,Hanu Prateek Kunduru]ES6 for Humans [推广有奖]

  • 0关注
  • 62粉丝

VIP

已卖:4194份资源

院士

67%

还不是VIP/贵宾

-

TA的文库  其他...

Bayesian NewOccidental

Spatial Data Analysis

东西方数据挖掘

威望
0
论坛币
50288 个
通用积分
83.6906
学术水平
253 点
热心指数
300 点
信用等级
208 点
经验
41518 点
帖子
3256
精华
14
在线时间
766 小时
注册时间
2006-5-4
最后登录
2022-11-6

楼主
Lisrelchen 发表于 2017-7-21 00:33:50 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币


  1. ES6 for Humans: The Latest Standard of JavaScript: ES2015 and Beyond
  2. Authors: Deepak Grover – Hanu Prateek Kunduru

  3. ISBN-10 书号: 1484226224
  4. ISBN-13 书号: 9781484226223
  5. Edition: 1st ed.
  6. Release 出版日期: 2017-08-17
  7. pages 页数: (137)
  8. 39.99

  9. Book Description
  10. Learn ES6 best practices for code optimization and organization and walk through practical, common examples of how to implement complete components of your applications. While this book covers the basic concepts of modern JavaScript, it primarily focuses on the new syntax, data-types, functionalities, and everything else that’s new in ES6, the latest standard of JavaScript.

  11. You’ll examine how to use ES6 in functional programming and explore the new more modular and object-oriented approach to JavaScript. This book will help you sharpen and upgrade your JavaScript language skills so you to easily explore modern ES6 based frameworks or libraries such as ReactJS, ReactNative, Angular4 and Vue.js.

  12. ES6 for Humans is a complete guide to writing ES6 and will enable you to start taking advantage of this exciting new version of JavaScript.

  13. What You’ll Learn
  14. Use all the new features added to JavaScript
  15. Compare ES5 and ES6 in varied situations
  16. Refresh your core JavaScript fundamentals
  17. Understand the modular and object-oriented approach to JavaScript
  18. Who this Book Is For
  19. Any Javascript developer who wants to fully understand and dive into the new features of ES6/ES2015.

  20. Developers with some background in programming, preferably in JavaScript.

  21. A basic understanding of coding concepts and exposure to object-oriented programming is expected.

  22. Contents
  23. Chapter 1: Getting Started with ES6
  24. Chapter 2: New Syntax in ES6
  25. Chapter 3: Destructuring
  26. Chapter 4: Classes in ES6
  27. Chapter 5: Modules
  28. Chapter 6: Symbols in ES6
  29. Chapter 7: Arrays and Collections
  30. Chapter 8: Iterators and Generators
  31. Chapter 9: Promises in ES6
  32. Chapter 10: Meta Programming
  33. Chapter 11: Beyond ES6
复制代码

本帖隐藏的内容

ES6.pdf (1.78 MB, 需要: 5 个论坛币)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝


本帖被以下文库推荐

沙发
Lisrelchen(未真实交易用户) 发表于 2017-7-21 00:57:16
  1. Symbols and Registry
  2. So far, we have talked about local symbols and how you can access them by obtaining
  3. a reference. Symbols can also be placed in a global registry, from where they can be
  4. accessed across different contexts known as realms. A realm is a context in which pieces
  5. of code exist such as the page your application is running in, or an <iframe> within your
  6. page, or a web worker with their context containing global variables and loaded modules.
  7. Symbols come with a special power to be available throughout the runtime-wide
  8. symbol registry, and you can use the following methods to add symbols to the runtimewide
  9. symbol registry:
  10. Symbol.for(key) and Symbol.keyFor(symbol).
复制代码

藤椅
Lisrelchen(未真实交易用户) 发表于 2017-7-21 00:58:02
  1. Symbol.keyFor(symbol)
  2. Symbol.keyFor(symbol) retrieves the key from the global symbol registry that was
  3. associated with the given symbol when the symbol was added to the registry. It returns
  4. undefined when the symbol is not found in the registry.
  5. const symbol = Symbol.for('myHouse');
  6. console.log(Symbol.keyFor(symbol)); // myHouse
  7. const myCat = Symbol();
  8. Symbol.keyFor(myCat); // undefined
复制代码

板凳
Lisrelchen(未真实交易用户) 发表于 2017-7-21 00:58:44
  1. Built-In Symbols
  2. ES6 comes with a range of symbols that are predefined in the language specification,
  3. most of which expose some meta properties and behaviors of JavaScript objects. Some of
  4. the well-known symbols are the following:
  5. Symbol.hasInstance - which allows us to determine whether an object is the
  6. instance of the constructor. It is called by instanceof operator internally.
复制代码

报纸
Lisrelchen(未真实交易用户) 发表于 2017-7-21 01:02:22

Array.from()

  1. const customers = {
  2. '0': 'matt',
  3. '1': 'ian',
  4. '2': 'mikhail',
  5. '3': 'akia',
  6. '4': 'vincent',
  7. length: 5
  8. };
  9. Now, if we were to convert this object into an array, we can do it using the Array.
  10. from() syntax simply like this:
  11. Array.from(customers).forEach(customer => {
  12. console.log(customer);
  13. });
  14. In this example, we just passed into the function the customer object, and in turn it
  15. returns an array formed from the individual elements. Let’s look at the specific Array.from
  16. syntax:
  17. Array.from(arrayLike[, mapFn[, thisArg]])
复制代码

地板
Lisrelchen(未真实交易用户) 发表于 2017-7-21 01:06:00

Array.of()

  1. Array.of()
  2. Another really handy method introduced in ES6 is Array.of(), which lets you create an
  3. array of elements easily. Array.of() takes a list of items as parameters and returns them
  4. to you as an array. Consider the following example,
  5. let arr = Array.of(10, 20, 30, 40);
  6. console.log(arr); // [10, 20, 30, 40]
  7. You might be wondering how is this different from the traditional Array(...)
  8. constructor. You can also create an array with the array constructor method using the
  9. Array() syntax. But, the difference between Array.of() and the Array constructor is
  10. the way they handle a single number as an argument. The Array constructor has a very
  11. weird behavior where if only one number is passed to it, instead of making an array of
  12. one element with that number value, it constructs an empty array with the number as its
  13. length. All the elements are set to undefined.
  14. The Array.of() static method fixes this issue and is now the preferred function-form
  15. constructor for arrays.
  16. Take a look at the following example:
  17. const arr1 = Array.of(10);
  18. console.log(arr1); // [10]
  19. console.log(arr1.length); // 1
  20. const arr2 = Array(10);
  21. console.log(arr2); // [,,,,,,,,,]
  22. console.log(arr2.length); // 10
复制代码

7
Lisrelchen(未真实交易用户) 发表于 2017-7-21 01:08:11
  1. Array.prototype.keys( )
  2. This method returns a new Array Iterator that contains the keys for each index in the array:
  3. const breakfast = ['apples', 'bananas', 'oranges'];
  4. const kBreakfast = breakfast.keys();
  5. console.log(kBreakfast.next().value); // 0
  6. console.log(kBreakfast.next().value); // 1
  7. console.log(kBreakfast.next().value); // 2
复制代码

8
Lisrelchen(未真实交易用户) 发表于 2017-7-21 01:08:41

Array.prototype.values( )

  1. Array.prototype.values( )
  2. This method returns a new Array Iterator object that contains the values for each index in
  3. the array:
  4. const breakfast = ['apples', 'bananas', 'oranges'];
  5. const vBreakfast = breakfast.values();
  6. console.log(vBreakfast.next().value); // apples
  7. console.log(vBreakfast.next().value); // bananas
  8. console.log(vBreakfast.next().value); // oranges
复制代码

9
Lisrelchen(未真实交易用户) 发表于 2017-7-21 01:10:36
  1. Array.prototype.findIndex( )
  2. This method is an equivalent of find(). Instead of returning an item, this method
  3. returns the index position. If none of the elements in the collection match the callback
  4. (element, index, array) criteria, the return value is -1.
  5. Consider the following code snippet, for example:
  6. result = inventory.findIndex((fruit) => fruit.name === 'apples');
  7. console.log(result); // 0
  8. result = inventory.findIndex((fruit) => fruit.name === 'grapes');
  9. console.log(result); // -1
  10. This method is similar to the indexOf()method from ES5, which simply locates
  11. the element in the array. With the indexOf() method, you can only search for an
  12. element inside an array; it doesn’t support a callback method. Whereas in case of the
  13. findIndex()method, we have the capability to apply a condition to which the element at
  14. the returned index position must satisfy.
复制代码

10
Lisrelchen(未真实交易用户) 发表于 2017-7-21 01:23:29
  1. Array.prototype.copyWithin( )
  2. The copyWithin()method copies the sequence of array elements within the array to
  3. the position starting at target. The elements that should be copied are taken from the
  4. (start, end) range. The start argument is optional and defaults to 0. Also, the end
  5. argument is also optional and defaults to the length of the array.
  6. The syntax of copyWithin() method looks like this:
  7. Array.prototype.copyWithin(target, start = 0, end = this.length)
  8. Let’s start with a simple example. Consider the following code snippet:
  9. let fruits = ["apples", "bananas", "oranges", "grapes", "guava",
  10. "watermelon"];
  11. fruits.copyWithin(4);
  12. console.log(fruits);
  13. // ["apples", "bananas", "oranges", "grapes", "apples", "bananas"]
复制代码

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-2-7 12:36