You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -353,7 +353,7 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
353
353
5. ### Template literals
354
354
Prior to ES6, JavaScript developers would need to do ugly string concatenation to creat dynamic strings.
355
355
356
-
Template literals allows you to work with strings in a newway compared to ES5. These are just string literals allowing embedded expressions denoted by the dollar sign and curly braces (${expression}). Also, these literals are enclosed by the backtick (``) character instead of double or single quotes.
356
+
Template literals allows you to work with strings in a newway compared to ES5. These are just string literals allowing embedded expressions denoted by the dollar sign and curly braces (`${expression}`). Also, these literals are enclosed by the backtick (`````) character instead of double or single quotes.
357
357
358
358
ES6 has two new kinds of literals:
359
359
@@ -591,7 +591,7 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
591
591
// module "my-module.js"
592
592
593
593
exportdefaultfunctionadd(...args) {
594
-
return args.reduce((num, tot) => tot + num);
594
+
returnargs.reduce((num, tot) => tot + num);
595
595
}
596
596
```
597
597
@@ -680,14 +680,14 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
680
680
681
681
typeMap.set('10', 'string'); // a string key
682
682
typeMap.set(10, 'number'); // a numeric key
683
-
typeMap.set(true, 'boolean'); // a boolean key
683
+
typeMap.set(true, 'boolean'); // a boolean key
684
684
typeMap.set(keyObj, 'object'); // an object key
685
685
686
686
687
-
console.log(typeMap.get(10) ); // number
688
-
console.log(typeMap.get('10') ); // string
689
-
console.log(typeMap.get(keyObj)) // object
690
-
console.log(typeMap.get({'one': 1})) // undefined
687
+
console.log(typeMap.get(10));// number
688
+
console.log(typeMap.get('10')); // string
689
+
console.log(typeMap.get(keyObj)); // object
690
+
console.log(typeMap.get({'one':1}));// undefined
691
691
692
692
console.log(typeMap.size ); // 3
693
693
@@ -712,8 +712,8 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
712
712
```js
713
713
var weakMap =newWeakMap();
714
714
715
-
var obj1 = {}
716
-
var obj2 = {}
715
+
var obj1 = {}
716
+
var obj2 = {}
717
717
718
718
719
719
weakMap.set(obj1, 1);
@@ -738,14 +738,14 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
0 commit comments