When running code

function testWhile(a){ var x = 0; var i = 1; while ( i <= a) { if( i % 2 == 0) { x += i; } i++; } return x; } console.log(testWhile(3)); 

(and others) does not give the final result.

It gives in the column 'output':

 [Running] node "d:\Project Web\JS\Learning JS\task.js" [Done] exited with code=0 in 0.329 seconds 

In the 'terminal' column:

 Microsoft Windows [Version 6.1.7601] (c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены. D:\Project Web\JS\Learning JS> 

I would like to see the console.log output (....); And the results of other tasks. What am I doing wrong ? What I do not do in order to achieve the desired result?

    0