+ 3

Good day to all. I have a problem with the "Set a world record" task. What is missing in my code??

var height = parseFloat(readLine(), 10) if (height > 2,45){console.log ("new record");} else {console.log ("not this time");}

1st Dec 2021, 11:48 AM
Николай
5 Antworten
+ 3
To write doubles or floats in programming you use a period (.) and not a comma (,).
1st Dec 2021, 11:54 AM
Lebi
+ 3
2,45 comma operator ? 2.45 use period or dot operator please tag the language also.
1st Dec 2021, 11:51 AM
Jayakrishna 🇮🇳
+ 3
Thank you so much. I've already broken my head)
1st Dec 2021, 12:27 PM
Николай
+ 1
var height = parseFloat(readLine(), 10) //your goes code here if(height<= 2.45){ console.log("not this time") }else{ console.log( "new record") }
12th Sep 2022, 11:09 AM
islam rwashdeh
- 1
var height = parseFloat(readLine(), 10) //your goes code here if (height > 2.45 ){ console.log("new record"); }else { console.log("not this time") }
20th Oct 2022, 12:19 PM
sainul abidin