Skip to content

Commit a806838

Browse files
committed
Function, Global, JSON spec updates from .pdf to .html
1 parent 38f1d3c commit a806838

3 files changed

Lines changed: 34 additions & 38 deletions

File tree

content/JavaScript/function.jsdoc

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@ Functions are reusable pieces of code that can be executed with
44
different parameters.
55

66
Spec:
7-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=129
7+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.3
88

99
----
1010
Function([param1 : String, [param2 : String, [...]]], body : String) : Function
1111

12+
Same as %%#new_Function_String_String_dotdotdot_String|**new Function(param1, param2, ..., body)**%%.
13+
14+
Spec:
15+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.1.1
16+
17+
----
18+
new Function([param1 : String, [param2 : String, [...]]], body : String) : Function
19+
1220
Creates a new **Function** that has the supplied parameter names and body.
1321
If any parameter name contains a **','**, it will be split on the **','** and
1422
each component will be added as a parameter. Unless the **body** needs to
@@ -25,15 +33,7 @@ var w = new Function('x', 'y', 'return x + y;');
2533
</example>
2634

2735
Spec:
28-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=129
29-
30-
----
31-
new Function([param1 : String, [param2 : String, [...]]], body : String) : Function
32-
33-
Same as %%#Function_String_String_dotdotdot_String|**Function(param1, param2, ..., body)**%%.
34-
35-
Spec:
36-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=129
36+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.2.1
3737

3838
----
3939
prototype.apply([thisArg : Object, [parameters : Array]]) : Object
@@ -51,9 +51,8 @@ var numbers = [3, 20, 1, 45];
5151
console.log(Math.max.apply(undefined, numbers));
5252
</example>
5353

54-
5554
Spec:
56-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=131
55+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.4.3
5756

5857

5958
----
@@ -72,7 +71,7 @@ console.log(Math.max.call(undefined, 3, 20, 1, 45));
7271

7372

7473
Spec:
75-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=131
74+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.4.4
7675

7776

7877
----
@@ -108,9 +107,8 @@ var add5 = sum.bind(null, 5);
108107
console.log(add5(10));
109108
</example>
110109

111-
112110
Spec:
113-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=131
111+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.4.5
114112

115113

116114
----
@@ -124,7 +122,7 @@ console.log(add.length);
124122
</example>
125123

126124
Spec:
127-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=130
125+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.5.1
128126

129127

130128
----
@@ -146,4 +144,4 @@ myButton.click();
146144
</example>
147145

148146
Spec:
149-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=130
147+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.5.2

content/JavaScript/global.jsdoc

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The following are properties of the global object. They can be accessed from
44
anywhere without additional qualifiers.
55

66
Spec:
7-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=115
7+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1
88

99

1010
----
@@ -21,7 +21,7 @@ console.log(Math.sqrt(-1));
2121
</example>
2222

2323
Spec:
24-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=115
24+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.1.1
2525

2626
----
2727
Infinity : Number
@@ -34,8 +34,7 @@ console.log(1/0);
3434
</example>
3535

3636
Spec:
37-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=116
38-
37+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.1.2
3938

4039
----
4140
undefined: undefined
@@ -52,7 +51,7 @@ console.log(noReturn());
5251

5352

5453
Spec:
55-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=116
54+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.1.3
5655

5756
----
5857
eval(code : String) : Object
@@ -64,7 +63,7 @@ console.log(eval('1 + 1'));
6463
</example>
6564

6665
Spec:
67-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=116
66+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.2.1
6867

6968
----
7069
parseInt(str : String, [base : Number]) : Number
@@ -84,7 +83,7 @@ console.log(parseInt('012', 10)); // Force decimal
8483

8584

8685
Spec:
87-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=116
86+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.2.2
8887

8988

9089
----
@@ -97,7 +96,7 @@ console.log(parseFloat('3.14') * 2);
9796
</example>
9897

9998
Spec:
100-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=117
99+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.2.3
101100

102101
----
103102
isNaN(x : Number) : Boolean
@@ -113,8 +112,7 @@ console.log(isNaN(x));
113112
</example>
114113

115114
Spec:
116-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=117
117-
115+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.2.4
118116

119117
----
120118
isFinite(x: Number) : Boolean
@@ -129,7 +127,7 @@ console.log(isFinite(1.2)); // 1.2 is finite
129127

130128

131129
Spec:
132-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=117
130+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.2.5
133131

134132
----
135133
decodeURI(encodedURI : String) : String
@@ -141,7 +139,7 @@ console.log(decodeURI('http://foo/bar%20baz'));
141139
</example>
142140

143141
Spec:
144-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=121
142+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.1
145143

146144
----
147145
decodeURIComponent(encodedURIComponent : String) : String
@@ -153,7 +151,7 @@ console.log(decodeURIComponent('http%3A%2F%2Ffoo%2Fbar%20baz'));
153151
</example>
154152

155153
Spec:
156-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=121
154+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.2
157155

158156
----
159157
encodeURI(uri : String) : String
@@ -165,7 +163,7 @@ console.log(encodeURI('http://foo/bar baz'));
165163
</example>
166164

167165
Spec:
168-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=122
166+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.3
169167

170168
----
171169
encodeURIComponent(component : String) : String
@@ -178,5 +176,5 @@ console.log(encodeURIComponent('http://foo/bar baz'));
178176
</example>
179177

180178
Spec:
181-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=122
179+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.4
182180

content/JavaScript/json.jsdoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ JSON : Object
33
Contains methods for encoding and decoding JSON strings.
44

55
Spec:
6-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=214
6+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.12
77

88
----
99
parse(str : String) : Object
@@ -17,7 +17,7 @@ console.log(x.bar);
1717
</example>
1818

1919
Spec:
20-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=215
20+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.2
2121

2222
----
2323
parse(str : String, reviver(key : String, value : String) : Object) : Object
@@ -40,7 +40,7 @@ console.log(x.bar);
4040
</example>
4141

4242
Spec:
43-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=215
43+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.2
4444

4545
----
4646
stringify(value : Object) : String
@@ -59,7 +59,7 @@ console.log(JSON.stringify(x));
5959
</example>
6060

6161
Spec:
62-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=217
62+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3
6363

6464
----
6565
stringify(value : Object, replacer(key : String, value : Object) : String, [indent : String]) : String
@@ -81,7 +81,7 @@ console.log(JSON.stringify(x, replacer, ' '));
8181
</example>
8282

8383
Spec:
84-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=217
84+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3
8585

8686
----
8787
stringify(value : Object, keyNames : Array<String>, [indent : String]) : String
@@ -96,5 +96,5 @@ console.log(JSON.stringify(x, ['foo']));
9696
</example>
9797

9898
Spec:
99-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=217
99+
http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3
100100

0 commit comments

Comments
 (0)