Number Function Returning String
i am making a program that will calculate the present age using user's date of birth but even after using the Number() ,the typeof() of variables aren't changing and remain string.
Solution 1:
You are not assigning the value back to the original variable,
month = Number(month);
Basically Number
function would return a value of type number
. You have to receive it in a variable to make use of that.
Post a Comment for "Number Function Returning String"