🌐 AI搜索 & 代理 主页
Skip to content

Commit f7cf595

Browse files
authored
TYPE CONVERSION OF VARIABLES IN JS
1 parent 0a67756 commit f7cf595

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

type-conversion.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// In JavaScript type of variables can be changed by using the type conversion and type coercion properties
2+
let num = 221;
3+
console.log("The type of num is " + typeof num);
4+
5+
let numNew=String(num);
6+
console.log("The type of num after type conversion is " + typeof numNew);

0 commit comments

Comments
 (0)