asked 80.8k views
3 votes
CODEHS PLEASE HELP ME(check attached pic)

CODEHS PLEASE HELP ME(check attached pic)-example-1

1 Answer

5 votes

Answer:

JavaScript Notation (If it is not JavaScript, Comment on this problem and I will immediately change it.)

var width = prompt("Input width.")

var length = prompt("Input length.")

if (length === width) {

console.log(length*width , " is your area of the square.")

} else {

console.log(2*length*2*width , " is your perimeter of the rectangle.)

answered
User Bumperbox
by
7.1k points

Related questions

asked Oct 16, 2024 145k views
Galatians asked Oct 16, 2024
by Galatians
8.4k points
1 answer
2 votes
145k views
1 answer
4 votes
5.1k views