beginning to calc app

This commit is contained in:
sweatshirt0 2023-01-23 15:47:14 -05:00
parent e49d664c04
commit c39aa9e957
3 changed files with 16 additions and 2 deletions

14
calculator.js Normal file
View File

@ -0,0 +1,14 @@
const prompt = require("prompt-sync")({sigint: true});
function add(a, b) {
let e = a + b;
return e;
}
let c = prompt("Num 1: ");
let d = prompt("Num2: ");
let op = prompt("What operation? ");
if (op == "+") {
console.log(Number(c) + Number(d));
}

2
node_modules/.package-lock.json generated vendored
View File

@ -1,5 +1,5 @@
{ {
"name": "javascript-sandbox", "name": "sandbox-js",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{ {
"name": "javascript-sandbox", "name": "sandbox-js",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {