Skip to content

Commit ec6f789

Browse files
author
James Halliday
committed
fix js formatting
1 parent b213b35 commit ec6f789

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

javascript.markdown

+7
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ $ node args.js one two three
624624
The first 2 arguments aren't too useful, just `node` and the
625625
full path to our script, but the remaining arguments are
626626
everything that follows `args.js` on the command-line.
627+
627628
---
628629
To get only the useful arguments, we can use `.slice(2)`:
629630

@@ -658,6 +659,7 @@ $ node add.js 3 5
658659
Note that every element in `process.argv` is a string, so we
659660
can use the built-in `Number` function to convert from a
660661
string to a number.
662+
661663
---
662664
# objects
663665

@@ -667,6 +669,7 @@ We've already been using some objects:
667669
`argv` that is an array.
668670
* `console` is an object with a property
669671
`log` that is a function.
672+
670673
---
671674
# objects
672675

@@ -1055,6 +1058,7 @@ console.log(add(5, 2)); // 7
10551058
10561059
When you declare functions in expressions you don't need to
10571060
give them a name.
1061+
10581062
---
10591063
# immediately executing function
10601064
@@ -1073,6 +1077,7 @@ console.log(sum); // 12
10731077
Variables declared inside functions are only visible in that
10741078
function, so immediately executing functions are sometimes
10751079
used to create an isolated scope.
1080+
10761081
---
10771082
You could even do:
10781083
@@ -1240,6 +1245,7 @@ console.log(n.multiply(3)); // 315
12401245
12411246
`n` is an "instance" of Num. You can make as many instances
12421247
as you like and they will all have separate values.
1248+
12431249
---
12441250
# constructors: new trick
12451251
@@ -1414,6 +1420,7 @@ Your entirely optional homework is to get through the
14141420
`javascripting` lesson on nodeschool:
14151421
14161422
http://nodeschool.io/#javascripting
1423+
14171424
---
14181425
# links
14191426

0 commit comments

Comments
 (0)