Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) In Atom, create a new program file named triangle.js in your p2 folder. b) Write a function named getTriangleType that accepts three numbers representing

image text in transcribed
image text in transcribed
a) In Atom, create a new program file named triangle.js in your p2 folder. b) Write a function named getTriangleType that accepts three numbers representing the sides of a triangle, and returns a string representing the triangle type, "equilateral", "isosceles", or "scalene". Use function expression syntax to define the function. An equilateral triangle has all three sides the same length. An isosceles triangle has at least two sides the same length. (It is sometimes specified as having exactly two sides the same length, but for the purposes of this exercise we'll say at least two). A scalene triangle has all sides of different lengths. Examples: > getTriangleType (2, 10, 12) > "scalene > getTriangleType ( 18, 18, 18) "equilateral

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

How does interconnectivity change how we live and work?

Answered: 1 week ago

Question

LO2 Compare three types of individual incentives.

Answered: 1 week ago