0

Does javascript allows datatype conversation? I need some examples

when I getting input from prompt window and I want to add them then the result shows after concat them

25th Mar 2017, 5:47 AM
Md. Boshirul Islam Khan
Md. Boshirul Islam Khan - avatar
2 Réponses
+ 1
Yes, you can change variable datatype in JavaScript. Example: prompt get input as string if you need integer etc, you can change it var a=parceInt(prompt("Enter a value for A")); The A variable data will be string if you need integer just add ParceInt before prompt box
25th Mar 2017, 7:39 AM
Fatihullah Noory
Fatihullah Noory - avatar
+ 1
JavaScript Types are Dynamic. This means that the same variable can be used to hold different data types. https://www.w3schools.com/js/js_datatypes.asp https://www.w3schools.com/js/js_variables.asp
29th Mar 2017, 8:01 AM
FeCaMo
FeCaMo - avatar