We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a74584f commit d748723Copy full SHA for d748723
1 file changed
js_basics/conversionOperation.js
@@ -0,0 +1,14 @@
1
+let score = 52;
2
+console.log(typeof(score)); // this gives u NUMBER as output
3
+
4
+let scored = '85';
5
+console.log(typeof(scored)); // this gives u STRING as output
6
7
+//string to number conversion
8
+console.log(typeof(Number(scored))); // in scored we store string but we convert here into numbr so output is number
9
10
11
+// "87" => 33
12
+// "jhf" => NAN
13
+//true = 1
14
+// false = 0
0 commit comments