0
why this code is not working
function printTrapezoidArea([arg1,arg2,arg3]);{ let b1=parseFloat(arg1); let b2=parseFloat(arg2); let h=parsefloat(arg3); let area=(b1+b2)*h/2; console.log("TrapezoidArea = " + area); }
1 Antwort
0
* put values as one array or 3 extra parameters, don't mix it
* typo on parseFloat
* remove ";" after parameters definition
I added comments in my example:
https://code.sololearn.com/cfuboQNe5BOF/?ref=app
Please put your code in a script on playground instead of copying it into the description.