-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlecture10.html
59 lines (58 loc) · 3.26 KB
/
lecture10.html
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
52
53
54
55
56
57
58
59
<!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 10 | Ten JavaScript Useful and Important String Functions |</title>
</head>
<body>
*****************************Tutorial Start 🔥 ********************************
<h1>String Important Functions</h1>
<h4>concatenate function , concat() </h4>
<p>concat function combine one or more string are goings into one existing string,
current string me jitne element dege usko combine kar dega.</p>
<!--2. JAVASCRIPT CODE SNIPPET HERE-->
<h4>charAt(index) function</h4>
<p>the function is basically return the character at exposition with in the string</p>
<!--3. JAVASCRIPT CODE SNIPPET HERE-->
<h4>indexOf() function</h4>
<p>ye function charAt() function ka opposite hai, charAt() function ko hum index de rhe the, too voo character de rha tha,
indexOf() function me hum character dege too voo index dega.</p>
<!--4. JAVASCRIPT CODE SNIPPET HERE-->
<h4>LastIndexOf() function</h4>
<p>ye bhi humko index dega but voo last se check karega.</p>
<!--5. JAVASCRIPT CODE SNIPPET HERE-->
<h4>toUpperCase() function</h4>
<p>agar humko capital letter ki string chahiye saari too hum iss function ka use karege</p>
<!--6. JAVASCRIPT CODE SNIPPET HERE-->
<h4>toLowerCase() function</h4>
<p> agar humko lower letter ki string chahiye saari too hum iss function ka use karege</p>
<!--7. JAVASCRIPT CODE SNIPPET HERE-->
<h4>substring(start, end) function</h4>
<p>kisi bhi string se agar humko choota sa parts nikalna hai too hum iss function ka use karte hai,
yaha pe start index inclued hai but end index excluded hai, voo isko check nhi karega end wale ko, example below:
start is included, but end is not included it is excluded. And agar hum end lagana bhul gye too voo sab start se end
tak print kar dega.</p>
<!--8. JAVASCRIPT CODE SNIPPET HERE-->
<h4>startsWith() function</h4>
<p> mera pass koi string hai and usko muzea check karna hai kya voo string iss () letter se start ho rhi hai,
too hum iss startsWith() ka use kar sakte hai.</p>
<!--9. JAVASCRIPT CODE SNIPPET HERE-->
<h4>endsWith() function</h4>
<p> ye check karta hai ki koi string iss name se end ho rhi hai agar ho rhi hogi too return kardega true and agar uss
word se nhi ho rhi hogi too return kardega false
kya hamari current string given string se end ho rhi hai yaa nhi, ye check karta hai.</p>
<!--10. JAVASCRIPT CODE SNIPPET HERE-->
<h4>split() function</h4>
<p>agar humko koi cheez split karni hai (thodna hai), too hum split function use kar sakte hai</p>
<p> agar humko given string me space ko hatana hai, todhna hai too hum iss function ka use kar sakte hai </p>
<!--11. JAVASCRIPT CODE SNIPPET HERE-->
<h4>Bonus: trim() function</h4>
<p>ye basically start and end ke whitespaces ko remove karta hai </p>
<!--12. JAVASCRIPT CODE SNIPPET HERE-->
<!-- external javascript -->
<script src="lecture10.js"></script>
*****************************Tutorial End 🚀 ********************************
</body>
</html>