File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Debugging JavaScript
2+
3+ > [ https://www.youtube.com/watch?v=LVXY16PJ_jU ] ( https://www.youtube.com/watch?v=LVXY16PJ_jU )
4+
5+ Install [ Node.js] ( https://nodejs.org ) .
6+
7+ Within this folder run the terminal command ` npm install ` to install the
8+ ` devDependencies ` .
9+
10+ Then run ` npm start ` to start up a development server on ` http://localhost:9966 `
Original file line number Diff line number Diff line change 1+ // var getBears = require('./lib/get-bears.js')
2+ //
3+ // var noPolar = getBears()
4+ // noPolar.splice(1, 1)
5+ // console.log(noPolar)
6+ //
7+ // var noGrizzly = getBears()
8+ // noGrizzly.splice(0, 1)
9+ // console.log(noGrizzly)
10+
11+ var lots = require ( './lib/lots.js' )
12+ lots ( )
Original file line number Diff line number Diff line change 1+ module . exports = function ( ) {
2+ var bears = [ 'grizzly' , 'polar' , 'brown' ]
3+ debugger
4+ return bears
5+ }
Original file line number Diff line number Diff line change 1+
2+ function addBear ( arr ) {
3+ arr . push ( 'bear' + arr . length )
4+ }
5+ module . exports . addBear = addBear
6+
7+ module . exports = function ( ) {
8+ debugger
9+ var bears = [ ]
10+ for ( var i = 0 ; i < 100 ; i ++ ) {
11+ addBear ( bears )
12+ }
13+ return bears
14+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " debugging-javascript" ,
3+ "version" : " 0.1.0" ,
4+ "description" : " " ,
5+ "main" : " index.js" ,
6+ "scripts" : {
7+ "start" : " budo index.js"
8+ },
9+ "author" : " Kyle Robinson Young <kyle@dontkry.com> (http://dontkry.com)" ,
10+ "license" : " MIT" ,
11+ "dependencies" : {
12+ "nets" : " ^3.2.0"
13+ },
14+ "devDependencies" : {
15+ "budo" : " ^5.1.5"
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments