..:: Source code - 04var_primitiveToObject.js ::..

/**
 * Converting primitive data types: string, number and bool
 * into object data type
 */

//converting string into object
var name = 'John';
var name_obj = new String(name);

var type1 = typeof name;
var type2 = typeof name_obj;

console.log('name data type: '+type1+' - '+name);
console.log('name_obj data type: '+type2+' - '+name_obj);


//converting number into object
var year = 1971;
var year_obj = new Number(year);

var type1 = typeof year;
var type2 = typeof year_obj;

console.log('year data type: '+type1+' - '+year);
console.log('year_obj data type: '+type2+' - '+year_obj);
 

..:: NodeJS Console - 04var_primitiveToObject.js ::..

$ node 04var_primitiveToObject.js
name data type: string - John
name_obj data type: object - John
year data type: number - 1971
year_obj data type: object - 1971
$ps -aux | grep node (list all node processes)
sasa         849  0.5  0.5 1317120 85860 ?       Ssl  Oct08 282:36 node /home/sasa/regoch/regoch-www/server
sasa         880  0.4  0.5 1319240 88328 ?       Ssl  Oct08 235:21 node /home/sasa/dex8/dex8-www/server/index.js
sasa         890  0.5  0.5 11797800 85460 ?      Ssl  Oct08 333:53 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js
sasa         903  0.7  0.4 1329652 81844 ?       Ssl  Oct08 430:15 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js
sasa         929  0.4  0.4 1300184 68888 ?       Ssl  Oct08 225:54 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js
sasa         943  0.4  0.4 1300808 66008 ?       Ssl  Oct08 233:01 node /home/sasa/dex8/dex8-kiosk/server/index.js
sasa         980  0.6  0.5 11805104 92484 ?      Ssl  Oct08 364:05 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js
sasa         981  0.7  0.6 1148036 103692 ?      Ssl  Oct08 394:27 node /home/sasa/voovuu/voovuu-api/starter.js
sasa        1039  0.9  1.4 11941380 241420 ?     Ssl  Oct08 554:30 node /home/sasa/voovuu/voovuu-pub/server/index.js
sasa     2044488  0.3  0.4 1298112 66700 ?       Ssl  Nov01  76:59 node /home/sasa/dex8/dex8-panel/server/index.js
sasa     2574087  0.3  0.4 11792920 76828 ?      Ssl  Nov08  41:33 node /home/sasa/@mikosoft/dodo-examples/server/index.js
sasa     2702010  0.4  0.6 22296952 100888 ?     Ssl  Nov10  34:42 node /home/sasa/dex8/dex8-worker/starter.js
sasa     2702011  0.3  0.4 1100276 65888 ?       Ssl  Nov10  30:52 node /home/sasa/dex8/dex8-worker/starter.js
sasa     2702018  0.3  0.3 1099884 65368 ?       Ssl  Nov10  30:55 node /home/sasa/dex8/dex8-worker/starter.js
sasa     2702019  0.3  0.4 1100516 67252 ?       Ssl  Nov10  30:53 node /home/sasa/dex8/dex8-worker/starter.js
sasa     2702046  0.9  0.7 22327656 129260 ?     Ssl  Nov10  83:32 node /home/sasa/dex8/dex8-worker/starter.js
sasa     2702047  0.3  0.3 1099492 64940 ?       Ssl  Nov10  31:10 node /home/sasa/dex8/dex8-worker/starter.js
sasa     2702088  0.3  0.4 1100008 66224 ?       Ssl  Nov10  30:55 node /home/sasa/dex8/dex8-worker/starter.js
sasa     2702089  0.3  0.4 1099752 66140 ?       Ssl  Nov10  30:51 node /home/sasa/dex8/dex8-worker/starter.js
sasa     2702137  0.3  0.4 1099864 66028 ?       Ssl  Nov10  30:42 node /home/sasa/dex8/dex8-worker/starter.js
sasa     2702139  0.4  0.6 22297452 101576 ?     Ssl  Nov10  35:11 node /home/sasa/dex8/dex8-worker/starter.js
sasa     3097623  1.2  0.8 11716736 131644 ?     Ssl  Nov13  43:22 node /home/sasa/dex8/dex8-api/starter.js
www-data 3357382  0.0  0.0   2608   592 ?        S    06:41   0:00 sh -c ps -aux | grep node
www-data 3357384  0.0  0.0   3304   728 ?        S    06:41   0:00 grep node