annotate core-javascript/arguments.rst @ 194:2f10061fec29 javascript-exercises

$ python py/remove_answers.py
author jf3243
date Mon, 21 Nov 2011 17:27:12 +0000
parents ea9c424d19d7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
73859bf6d639 Add about-new, arguments and millers-device (and include from tutorial.js).
jf3243
parents:
diff changeset
1 Arguments
73859bf6d639 Add about-new, arguments and millers-device (and include from tutorial.js).
jf3243
parents:
diff changeset
2 =========
73859bf6d639 Add about-new, arguments and millers-device (and include from tutorial.js).
jf3243
parents:
diff changeset
3
142
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
4 This can be omitted at a first reading. The main point here is that
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
5 in JavaScript
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
6
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
7 #. There is no checking for number and type of arguments.
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
8
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
9 #. The arguments actually supplied are stored in a special variable,
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
10 called *arguments*.
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
11
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
12 #. The value of *arguments* is almost, but not exactly, an array.
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
13
ea9c424d19d7 Add comments to arguments.rst.
Jonathan Fine <jfine@pytex.org>
parents: 135
diff changeset
14
132
40950d42abec Add stub sections to code sample pages.
jf3243
parents: 111
diff changeset
15 Test code
40950d42abec Add stub sections to code sample pages.
jf3243
parents: 111
diff changeset
16 ---------
40950d42abec Add stub sections to code sample pages.
jf3243
parents: 111
diff changeset
17
135
f9f6684f9b32 $ hg mv tutorial.js core-javascript-work/ # and amend the rst files also
jf3243
parents: 132
diff changeset
18 .. literalinclude:: /core-javascript-work/tutorial.js
111
73859bf6d639 Add about-new, arguments and millers-device (and include from tutorial.js).
jf3243
parents:
diff changeset
19 :language: javascript
73859bf6d639 Add about-new, arguments and millers-device (and include from tutorial.js).
jf3243
parents:
diff changeset
20 :start-after: start return_arguments
73859bf6d639 Add about-new, arguments and millers-device (and include from tutorial.js).
jf3243
parents:
diff changeset
21 :end-before: end return_arguments