prompt——window method

//the syntax
let triangleBase = prompt('trianglebase','write');
console.log(triangleBase);
//also
console.log(prompt('trianglebase','write'));
//it is like that only one text can be write when using this method
  

something new

let a = prompt('triangle side a'), b = prompt('triangle side b'), c = prompt('triangle side c');
perimeter = a + b + c; 
console.log(`the perimeter of the triangle is ${perimeter}`);
//an unexpected result
//the perimeter of the triangle is 123

//so input will be the string

//add parseInt()
let a = parseInt(prompt('triangle side a')), b = parseInt(prompt('triangle side b')), c = parseInt(prompt('triangle side c'));
perimeter = a + b + c; 
console.log(`the perimeter of the triangle is ${perimeter}`);
//the right result
//the perimeter of the triangle is 6