I don't know why it's happening d is treated as string
11/15/2017 10:51:47 AM
That's because prompt accepts strings only.
Do like the following:
var y = Number(prompt("Enter year"));
use parseInt to convert it to integer.
thx a lot
how to split a numeric data input
like I have to use 3 of 5340
Covert it to a string, then get the index of your number and catch it with substr.
var x = 5340
Send us a message