From d0985b493a20e6482b8417446ba0e6d30c50d131 Mon Sep 17 00:00:00 2001 From: Eric Douglas Date: Mon, 12 May 2014 21:26:33 -0300 Subject: [PATCH] some 'fix example.js 01.01.02 --- .../02-core-elements-of-a-program/example.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/archives/01-introduction-to-computer-science-and-programming/archives/UNIT-01/02-core-elements-of-a-program/example.js b/archives/01-introduction-to-computer-science-and-programming/archives/UNIT-01/02-core-elements-of-a-program/example.js index 4ee9fac..e6b2bd8 100644 --- a/archives/01-introduction-to-computer-science-and-programming/archives/UNIT-01/02-core-elements-of-a-program/example.js +++ b/archives/01-introduction-to-computer-science-and-programming/archives/UNIT-01/02-core-elements-of-a-program/example.js @@ -1,21 +1,3 @@ x = 3; // Create variable and assign value 3 to it x = x * x; // Bind x to value 9 console.log( x ); // print the x's value -process.stdout.write( 'Enter a number: ' ); // better way to print in the terminal -process.stdin.resume(); -// convert the entered value from stream to a string -// process.stdin.setEncoding( 'utf8' ); -var y = ''; -process.stdin.once('data', function( inputText ) { - y = inputText.toString(); - process.stdout.write( typeof y + '\n'); - process.stdout.write( y + '\n' ); - - process.stdout.write( 'Enter another number: ' ); - - process.stdin.once('data', function( inputText ) { - y = parseFloat( inputText.toString() ); - process.stdout.write( typeof y + '\n'); - process.stdout.write( y + '\n' ); - }); -});