This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var a = {}, | |
| b = {}; | |
| // primitives are passed by value | |
| a.num = 1; | |
| b.num = a.num; | |
| b.num = 5; | |
| a.num; // still equals 1 | |
| b.num; // equals 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function foo( i ) | |
| { | |
| if ( i === 0 ) | |
| { | |
| return; | |
| } | |
| foo( i - 1 ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require( 'fs' ), | |
| // size in bytes | |
| CHUNK_SIZE = 50, | |
| file = fs.open( 'file', 'r', '0666', function( err, fd ) | |
| { | |
| if ( err ) | |
| { | |
| console.log( err ); |