I need help understanding why my output is showing shapes and different numbers. I already inputed npm into my command terminal to run prompt correctly. This is for JavaScript.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I need help understanding why my output is showing shapes and different numbers. I already inputed npm into my command terminal to run prompt correctly. This is for JavaScript. 

6
7
8
9
0
1
2
3
4
15
16
17
18
19
20
21
22
23
const prompt = require ("prompt-sync") ({sigint: true));
let triangleSidel = prompt ("Enter the length of the first side of the triangle:
console.log (triangleSidel);
let triangleSide2 = prompt ("Enter the length of the second side of the triangle:
console.log (triangleSide2);
let triangleSide3 = prompt ("Enter the length of the third side of the triangle:
console.log (triangleSide 3);
if (triangleSidel> triangleSide2 + triangleSide3 ||
triangleSide2 > triangleSidel + triangleSide3 ||
triangleSide3 > triangleSidel + triangleSide2) {
console.log("No, you can not make a triangle.");
else {
console.log("Yes, you can make a triangle.");
}
AppExec Console
CD: C:\Users\bcook\cop2801\assignment_2
ANT
Transcribed Image Text:6 7 8 9 0 1 2 3 4 15 16 17 18 19 20 21 22 23 const prompt = require ("prompt-sync") ({sigint: true)); let triangleSidel = prompt ("Enter the length of the first side of the triangle: console.log (triangleSidel); let triangleSide2 = prompt ("Enter the length of the second side of the triangle: console.log (triangleSide2); let triangleSide3 = prompt ("Enter the length of the third side of the triangle: console.log (triangleSide 3); if (triangleSidel> triangleSide2 + triangleSide3 || triangleSide2 > triangleSidel + triangleSide3 || triangleSide3 > triangleSidel + triangleSide2) { console.log("No, you can not make a triangle."); else { console.log("Yes, you can make a triangle."); } AppExec Console CD: C:\Users\bcook\cop2801\assignment_2 ANT
Process started (PID=21032) >>
Enter the length of the first side of the triangle: 12
[s0[2KO[0GEnter
32
the length of the first side of the triangle: 120[55GO[55G
[s0[2KO[0GEnter
[s0[2KO[OGEnter
[63G[63G
JavaScript file
the length of the first side of the triangle: 12320[57GO[57666666
the length of the first side of the triangle: 12326660[60G[60GO[SO
80°F
Mostly sunny
Transcribed Image Text:Process started (PID=21032) >> Enter the length of the first side of the triangle: 12 [s0[2KO[0GEnter 32 the length of the first side of the triangle: 120[55GO[55G [s0[2KO[0GEnter [s0[2KO[OGEnter [63G[63G JavaScript file the length of the first side of the triangle: 12320[57GO[57666666 the length of the first side of the triangle: 12326660[60G[60GO[SO 80°F Mostly sunny
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

I have tried to run the program without that line with const prompt = "..." but it says prompt is not defined. I also already installed "npm install prompt sync" and i still get the same error code everytime. I found the prompt line online, I don't know where the user got const prompt = require("prompt-sync")({sigint: true});

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Windows
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education