Skip to content

Commit e3cef12

Browse files
committed
More work on the new layout
1 parent 61924da commit e3cef12

File tree

11 files changed

+150
-109
lines changed

11 files changed

+150
-109
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/html/index.html
1+
/site/index.html
22
/build

doc/index.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
"sections": [
55
{
66
"title": "Intro",
7-
"dir": "intro"
7+
"dir": "intro",
8+
"articles": [
9+
"authors",
10+
"contributors",
11+
"license"
12+
]
813
},
914
{
1015
"title": "Objects",

doc/intro/authors.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## The authors
2+
3+
This guide is the work of two lovely Stack Overflow users, [Ivo Wetzel][1]
4+
(Writing) and [Zhang Yi Jiang][2] (Design).
5+
6+
In case you are interested in additional guidance or reviews concerning your JavaScript
7+
projects, Ivo Wetzel offers these on a freelance basis. Please feel free to
8+
contact him via [e-mail][3] for further details.
9+
10+
[1]: http://stackoverflow.com/users/313758/yi-jiang
11+
[2]: http://stackoverflow.com/users/170224/ivo-wetzel
12+
[3]: mailto:[email protected]
13+

doc/intro/contributors.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Contributors
2+
3+
- [Caio Romão][1] (Spelling corrections)
4+
- [Andreas Blixt][2] (Language corrections)
5+
6+
[1]: https://github.com/caio
7+
[2]: https://github.com/blixt
8+

doc/intro/index.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,5 @@ of the language is strongly recommended in order to understand the topics covere
1111
in this guide. In order to learn the basics of the language, please head over to
1212
the excellent [guide][1] on the Mozilla Developer Network.
1313

14-
### The authors
15-
16-
This guide is the work of two lovely Stack Overflow users, [Ivo Wetzel][6]
17-
(Writing) and [Zhang Yi Jiang][5] (Design).
18-
19-
In case you are interested in additional guidance or reviews concerning your JavaScript
20-
projects, Ivo Wetzel offers these on a freelance basis. Please feel free to
21-
contact him via [e-mail][7] for further details.
22-
23-
### Contributors
24-
25-
- [Caio Romão][8] (Spelling corrections)
26-
- [Andreas Blixt][9] (Language corrections)
27-
28-
### License
29-
30-
JavaScript Garden is published under the [MIT license][2] and hosted on
31-
[GitHub][4]. If you find errors or typos please [file an issue][3] or a pull
32-
request on the repository. You can also find us in the [JavaScript room][10] on
33-
Stack Overflow chat.
34-
3514
[1]: https://developer.mozilla.org/en/JavaScript/Guide
36-
[2]: https://github.com/BonsaiDen/JavaScript-Garden/blob/next/LICENSE
37-
[3]: https://github.com/BonsaiDen/JavaScript-Garden/issues
38-
[4]: https://github.com/BonsaiDen/JavaScript-Garden
39-
[5]: http://stackoverflow.com/users/313758/yi-jiang
40-
[6]: http://stackoverflow.com/users/170224/ivo-wetzel
41-
[7]: mailto:[email protected]
42-
[8]: https://github.com/caio
43-
[9]: https://github.com/blixt
44-
[10]: http://chat.stackoverflow.com/rooms/17/javascript
15+

doc/intro/license.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## License
2+
3+
JavaScript Garden is published under the [MIT license][1] and hosted on
4+
[GitHub][2]. If you find errors or typos please [file an issue][3] or a pull
5+
request on the repository. You can also find us in the [JavaScript room][4] on
6+
Stack Overflow chat.
7+
8+
[1]: https://github.com/BonsaiDen/JavaScript-Garden/blob/next/LICENSE
9+
[2]: https://github.com/BonsaiDen/JavaScript-Garden
10+
[3]: https://github.com/BonsaiDen/JavaScript-Garden/issues
11+
[4]: http://chat.stackoverflow.com/rooms/17/javascript
12+

doc/object/hasownproperty.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@ essential when iterating over the properties of any object. There is no other
2626
way to exclude properties that are not defined on the object **itself**, but
2727
somewhere on its prototype chain.
2828

29+
### `hasOwnProperty` as a property
30+
31+
JavaScript does not protect the property name `hasOwnProperty`; therefore, if the
32+
possibility exists that an object might have a property with this name, it is
33+
necessary to use an *external* `hasOwnProperty` in order to get correct results.
34+
35+
var foo = {
36+
hasOwnProperty: function() {
37+
return false;
38+
},
39+
bar: 'Here be dragons'
40+
};
41+
42+
foo.hasOwnProperty('bar'); // always returns false
43+
44+
// Use another hasOwnProperty and call it with 'this' set to foo
45+
{}.hasOwnProperty.call(foo, 'bar'); // true
46+
2947
### In conclusion
3048

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

garden.jade

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ html(lang='en')
1717
h1
1818
a(href='#' + section.link) #{section.title}
1919

20-
- if (section.articles.length > 0)
21-
ul
22-
- each article in section.articles
23-
li
24-
a(href='#' + article.link)!=article.title
20+
ul
21+
li
22+
a(href='#' + section.link + '.intro') Overview
23+
24+
- each article in section.articles
25+
li
26+
a(href='#' + article.link)!=article.title
2527

2628
// Sections
2729
- each section in sections
2830
section(id=section.link)
2931

3032
// Introduction
31-
header
33+
header(id=section.link + '.intro')
3234
h1 #{section.title}
3335
- if (section.parsed.index)
3436
div!=section.parsed.index.text

0 commit comments

Comments
 (0)