+ 1

Javascript output error?

int x=8; if(x>9) { document.write(9); } else { document.write(x); }

18th Aug 2024, 2:03 PM
NIKHIL JOSHI
NIKHIL JOSHI - avatar
2 Respuestas
+ 5
There is no `int` keyword in js, instead of `int` use `let`, `var` or `const`.
18th Aug 2024, 2:16 PM
Gulshan Mahawar
Gulshan Mahawar - avatar
0
Js is not strictly typed (there is no need to indicate its type when declaring a variable, just like in Py>:))
19th Aug 2024, 2:24 PM
Ник
Ник - avatar