Created
December 16, 2020 08:42
-
-
Save heypoom/6901abc1647c3e577979946cf3c3f3dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const readline = require("readline") | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}) | |
const read = (query) => new Promise((r) => rl.question(query, r)) | |
const print = console.log | |
async function loop() { | |
const code = await read("> ") | |
const ans = eval(code) | |
print(ans) | |
loop() | |
} | |
loop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment