Skip to content

Commit 0f72d49

Browse files
committed
Refactor single argument lambdats
1 parent 166ba19 commit 0f72d49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

JavaScript/2-readline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const rl = readline.createInterface({
77
output: process.stdout
88
});
99

10-
rl.question('Enter your name: ', (name) => {
10+
rl.question('Enter your name: ', name => {
1111
console.log(`Hello ${name} !`);
1212
rl.close();
1313
});

JavaScript/3-prompt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const commands = {
2222
}
2323
};
2424

25-
rl.on('line', (line) => {
25+
rl.on('line', line => {
2626
line = line.trim();
2727
const command = commands[line];
2828
if (command) command();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy