Skip to content

Commit 01fe309

Browse files
committed
Finally get around and start fixing some issues
1 parent 98a1f31 commit 01fe309

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

doc/en/core/undefined.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ overwritten.
1919
Some examples for when the value `undefined` is returned:
2020

2121
- Accessing the (unmodified) global variable `undefined`.
22+
- Accessing a declared *but not* yet initialized variable
2223
- Implicit returns of functions due to missing `return` statements.
2324
- `return` statements which do not explicitly return anything.
2425
- Lookups of non-existent properties.
2526
- Function parameters which do not had any explicit value passed.
2627
- Anything that has been set to the value of `undefined`.
28+
- Any expression in the form of `void(expression)`
2729

2830
### Handling Changes to the Value of `undefined`
2931

doc/en/function/constructors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Constructors in JavaScript are yet again different from many other languages. An
44
function call that is preceded by the `new` keyword acts as a constructor.
55

66
Inside the constructor - the called function - the value of `this` refers to a
7-
newly created `Object`. The [`prototype`](#object.prototype) of this **new**
7+
newly created object. The [prototype](#object.prototype) of this **new**
88
object is set to the `prototype` of the function object that was invoked as the
99
constructor.
1010

doc/en/function/scopes.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Although JavaScript deals fine with the syntax of two matching curly
44
braces for blocks, it does **not** support block scope; hence, all that is left
5-
is in the language is *function scope*.
5+
in the language is *function scope*.
66

77
function test() { // a scope
88
for(var i = 0; i < 10; i++) { // not a scope
@@ -213,12 +213,14 @@ being callable, they must first be evaluated.
213213
) // and return the function object
214214
() // call the result of the evaluation
215215

216-
There are other ways for evaluating and calling the function expression; which,
216+
There are other ways for evaluating and directly calling the function expression; which,
217217
while different in syntax, do behave the exact same way.
218218

219-
// Two other ways
220-
+function(){}();
219+
// A few other styles for directly invoking the
220+
!function(){}()
221+
+function(){}()
221222
(function(){}());
223+
// and so on...
222224

223225
### In Conclusion
224226

doc/en/object/hasownproperty.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ necessary to use an *external* `hasOwnProperty` in order to get correct results.
4444
// Use another Object's hasOwnProperty and call it with 'this' set to foo
4545
({}).hasOwnProperty.call(foo, 'bar'); // true
4646

47+
// It's also possible use the hasOwnProperty property from the Object property for this purpuse
48+
Object.prototype.hasOwnProperty.call(obj, 'bar'); // true
49+
50+
4751
### In Conclusion
4852

4953
When checking for the existence of a property on a object, `hasOwnProperty` is

0 commit comments

Comments
 (0)