Skip to content

Commit d3257e1

Browse files
authored
Update 1-stdin.js
1 parent 1bac4cb commit d3257e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

0x05-Node_JS_basic/1-stdin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ process.stdout.write('Welcome to Holberton School, what is your name?\n');
33
process.stdin.on('readable', () => {
44
const name = process.stdin.read();
55

6-
if (name.length > 0) {
6+
if (name?.length > 0) {
77
process.stdout.write(`Your name is: ${name}`);
88
}
99
});

0 commit comments

Comments
 (0)