diff -r 46e581d66f3a -r 13c6bd6e3477 progs/App3.js --- a/progs/App3.js Thu Sep 25 05:48:08 2014 +0100 +++ b/progs/App3.js Thu Sep 25 06:43:43 2014 +0100 @@ -17,21 +17,20 @@ var splits = s.split("-", 2); var counter = parseInt(splits[0]) if (mk_hash(counter.toString()) == splits[1]) { - return counter + return counter } else { - return 0 + return 0 } } - app.get('/', function(req, res){ var counter = gt_cookie(req.cookies.counter) || 0; res.cookie('counter', mk_cookie(counter + 1)); if (counter >= 5) { - res.write('You are a valued customer ' + - 'visting the site ' + counter + ' times.'); + res.write('You are a valued customer ' + + 'visting the site ' + counter + ' times.'); } else { - res.write('This is visit number '+ counter +'!'); + res.write('This is visit number '+ counter +'!'); } res.end(); });