Skip to content

Commit e21eb36

Browse files
authored
Merge pull request #16 from ixth/fix-typos
Fix typos
2 parents 0a3f2ef + 236dacd commit e21eb36

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
353353
5. ### Template literals
354354
Prior to ES6, JavaScript developers would need to do ugly string concatenation to creat dynamic strings.
355355

356-
Template literals allows you to work with strings in a new way 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 new way 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.
357357
358358
ES6 has two new kinds of literals:
359359
@@ -591,7 +591,7 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
591591
// module "my-module.js"
592592

593593
export default function add(...args) {
594-
return args.reduce((num, tot) => tot + num);
594+
return args.reduce((num, tot) => tot + num);
595595
}
596596
```
597597
@@ -680,14 +680,14 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
680680

681681
typeMap.set('10', 'string'); // a string key
682682
typeMap.set(10, 'number'); // a numeric key
683-
typeMap.set(true, 'boolean'); // a boolean key
683+
typeMap.set(true, 'boolean'); // a boolean key
684684
typeMap.set(keyObj, 'object'); // an object key
685685

686686

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
691691

692692
console.log(typeMap.size ); // 3
693693

@@ -712,8 +712,8 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
712712
```js
713713
var weakMap = new WeakMap();
714714

715-
var obj1 = {}
716-
var obj2 = {}
715+
var obj1 = {}
716+
var obj2 = {}
717717

718718

719719
weakMap.set(obj1, 1);
@@ -738,14 +738,14 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
738738
```js
739739
let str = '𠮷';
740740

741-
console.log(str.length); // 2
741+
console.log(str.length); // 2
742742
console.log(text.charAt(0)); // ""
743743
console.log(text.charAt(1)); // ""
744744
console.log(text.charCodeAt(0)); // 55362(1st code unit)
745745
console.log(text.charCodeAt(1)); // 57271(2nd code unit)
746746

747747
console.log(/^.$/.test(str)); // false, because length is 2
748-
console.log('\u20BB7); // 7!(wrong value)
748+
console.log('\u20BB7'); // 7!(wrong value)
749749
console.log(str === '\uD842\uDFB7'); // true
750750
```
751751
@@ -765,7 +765,7 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
765765
console.log(str.codePointAt(0)); // 134071
766766
console.log(str.codePointAt(1)); // 57271
767767

768-
console.log(String.fromCodePoint(134071)); // "𠮷"
768+
console.log(String.fromCodePoint(134071)); // "𠮷"
769769
```
770770
771771
**[⬆ Back to Top](#table-of-contents)**
@@ -808,8 +808,8 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
808808

809809
//3. Equality Checks
810810

811-
console.log(Symbol('foo') === Symbol('foo')); // false
812-
console.log(Symbol.for('foo') === Symbol.for('foo')); // true
811+
console.log(Symbol('foo') === Symbol('foo')); // false
812+
console.log(Symbol.for('foo') === Symbol.for('foo')); // true
813813
```
814814
815815
**[⬆ Back to Top](#table-of-contents)**
@@ -872,7 +872,7 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
872872

873873
person.age = 30;
874874
console.log(person.age); // 30
875-
person.age = 'old'; // Throws an exception
875+
person.age = 'old'; // Throws an exception
876876
person.age = 200; // Throws an exception
877877
```
878878
@@ -884,7 +884,7 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
884884
885885
It is in one of these states:
886886
887-
**pending:** Represents initial state, neither fulfilled nor rejected.
887+
**pending:** Represents initial state, neither fulfilled nor rejected.
888888
**fulfilled:** Indicates that the operation is completed successfully.
889889
**rejected:** Indicates that the operation is failed.
890890

0 commit comments

Comments
 (0)