write() method always returns the number of characters written. In your case, the method writes a string to a file (the console), so that your console displays string. Then, the method returns the number of characters stored in the file (the console), and outputs the return value to the console. Since the file in which are recorded, and the console - it's the same thing, then you have what you have. Just do not use stdout.write () in console
write() method always returns the number of characters written. In your case, the method writes a string to a file (the console), so that your console displays string. Then, the method returns the number of characters stored in the file (the console), and outputs the return value to the console. Since the file in which are recorded, and the console - it's the same thing, then you have what you have. Just do not use stdout.write () in console