Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f12eff1

Browse files
Merge pull request #97 from AlexTaietti/minor-fix
corrected some typos
2 parents ad4ffda + 93751de commit f12eff1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var x; // declaring x
2424
console.log(x); // output: undefined
2525
```
2626

27-
`var x = 1` is both declaration and definition (also we can say we are doing initialisation), Here declaration and assignment of value happen inline for variable x, In JavaScript every variable declaration and function declaration brings to the top of its current scope in which it's declared then assignment happen in order this term is called `hoisting`.
27+
`var x = 1` is both declaration and definition (what we are doing is called "initialisation"), Here declaration and assignment of value happen inline for variable x, In JavaScript both variable declarations and function declarations go to the top of the scope in which they are declared, then assignment happens—this series of events is called `hoisting`.
2828

2929
A variable can be declared but not defined. When we try to access it, It will result `undefined`.
3030

@@ -644,7 +644,7 @@ The `typeof` operator checks if a value belongs to one of the seven basic types:
644644

645645
`typeof(null)` will return `object`.
646646

647-
`instanceof` is much more intelligent: it works on the level of prototypes. In particular, it tests to see if the right operand appears anywhere in the prototype chain of the left. `instanceof` doesn’t work with primitive types. It `instanceof` operator checks the current object and returns true if the object is of the specified type, for example:
647+
`instanceof` is much more intelligent: it works on the level of prototypes. In particular, it tests to see if the right operand appears anywhere in the prototype chain of the left. `instanceof` doesn’t work with primitive types. The `instanceof` operator checks the current object and returns true if the object is of the specified type, for example:
648648

649649
```javascript
650650
var dog = new Animal();
@@ -674,11 +674,11 @@ counterArray["C"] = 1;
674674
```
675675
<details><summary><b>Answer</b></summary>
676676

677-
First of all, in case of JavaScript an associative array is the same as an object. Secondly, even though is no built-in function or property available to calculate the length/size an object, we can write such function ourselves.
677+
First of all, in the case of JavaScript an associative array is the same as an object. Secondly, even though there is no built-in function or property available to calculate the length/size an object, we can write such function ourselves.
678678

679679
#### Method 1
680680

681-
`Object` has `keys` method which can we used to calculate the length of object.
681+
`Object` has `keys` method which can be used to calculate the length of object.
682682

683683
```javascript
684684
Object.keys(counterArray).length; // Output 3

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /