-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlecture12.html
More file actions
51 lines (50 loc) · 2.58 KB
/
Copy pathlecture12.html
File metadata and controls
51 lines (50 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lecture 12 | Type Conversion in JS | | String Conversion | Numeric Conversion | Boolean Conversion</title>
</head>
<body>
*****************************Tutorial Start 🔥 ********************************
<h1>Type Conversion in JS | | String Conversion | Numeric Conversion | Boolean Conversion</h1>
<h4>Type conversio /Type casting</h4>
<p>Data(**)->variable(let a=5)</p>
<p>variables hold your data</p>
<p>variables jo data hold karega uska aik type hoga jisko hum data type bhi kehte hai.(data type)</p>
<p>what kind of data stored by variables is represented by data type</p>
<li>Num</li>
<li>string</li>
<li>boolean</li>
<li>Array</li>
<li>object</li>
<script>
let a=5;
/* variable num type ka data hold kar rha hai(num)type, and agar hum aage chalke num ko string
me change karna chahate hai too hum type casting ki help se kar sakte hai.
yaha humko 5 ki jarurat hai but humko a variable ko string me change karna hai.
Hum num datatype ko string me change kar sakte hai with the help of type conversion/ type casting
*/
/* Programming me bhut baar humko aik type ki value ko dusre type ki value me change karna hota hai. */
console.log(a);
</script>
<h2>Type Conversion has Three types</h2>
<li>Automatic type conversion/ Implicit type conversion</li>
<span>Bhut baar operators and function voo automatically convert kar dete hai value ko sahi data type mai </span>
<span>Example: alert()function automatically (bydefault) convert kar deta hai value ko string me.</span>
<span>Bhut saare function() aisee hai jo automatically convert kar dete hai values ko shai datatype me.</span>
<li>Manually Type Conversion/ Explicit type conversion</li>
<p>Lekin bhut baar humko khud jaruat padti hai convert karne ki manually </p>
<h2>Three Types of conversion most important </h2>
<li>String conversion(convert value into string)</li>
<!-- 1.JAVASCRIPT CODE SNIPPET HERE-->
<li>Numberic conversion(convert x type value into number)</li>
<!-- 3.JAVASCRIPT CODE SNIPPET HERE-->
<li>Boolean conversion(convert x type value into boolean)</li>
<!-- 3.JAVASCRIPT CODE SNIPPET HERE-->
*****************************Tutorial End 🚀 ********************************
<!-- external javascript -->
<script src="lecture12.js"></script>
</body>
</html>