0
Hi How can i do this? Ty
I wanna turn "y" a numeric var to get (y+5) without getting concatenation. Ty in advance. https://code.sololearn.com/WG21SImVNIes/?ref=app
9 Antworten
+ 4
It should.
You sure you write parseint with capital i?
You can try Number.parseInt() but I don’t think it makes any different.
+ 3
var y = prompt("Introduce un numero");
y = parseInt(y);
+ 2
parseInt(y);
+ 1
Thanks
+ 1
Please could u tell me how it woulf fix into my script, just to get it as an example. Ty mate
+ 1
Ty mate, very appreciated.
+ 1
var y = prompt("Introduce un numero");
y = parselnt(y);
var x = y + 5;
alert(x);
it says "parselnt" is not defined line 5
cant make it work
+ 1
Gonna check it, ty Toni your help is very appreciated.
+ 1
LOL sorry, i was writing parseLnt, tought it was an L, it Works perfectly now