We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd6168e commit 1deb3e3Copy full SHA for 1deb3e3
app/main.js
@@ -1,5 +1,7 @@
1
const readline = require("readline");
2
3
+const commands = [];
4
+
5
const rl = readline.createInterface({
6
input: process.stdin,
7
output: process.stdout,
@@ -8,3 +10,11 @@ const rl = readline.createInterface({
8
10
rl.question("$ ", (answer) => {
9
11
rl.close();
12
});
13
14
+const main = (rl) => {
15
+ if (commands.includes(rl.question)) {
16
+ console.log(`invalid_command: ${rl.question.split(" ")[0]} not found`);
17
+ }
18
+};
19
20
+main();
0 commit comments