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