let number2=prompt(" specify enter").trim(); // input= "25" let number1="25"; console.log(Number(number2)) // output= NAN [NOT A NUMBER] console.log(Number(number1)) // output= 25
I have already asked chatgpt and chatgpt also agrees with me that if the input you entered is a string “25” , then the output should be same . the output should be :
25
25
New contributor
hafiz Umer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1