Q-5 Write
a program in JavaScript that shows how the variable’s type can be changed on the
runtime.
Description:-You can use the var keyword in JavaScript to define a
variable in HTML. In JavaScript the data types of the variable is loosely typed
so we can change the data type of the variable at any time. A same variable can
have different values at different times of different data types.
Syntax:- var
<variable name>=value;
No comments:
Post a Comment