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.
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
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.

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

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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images

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
Knowledge Booster
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
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education