-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.html
125 lines (121 loc) · 6.82 KB
/
blog.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Blog</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<script src="https://kit.fontawesome.com/55421af7af.js" crossorigin="anonymous"></script>
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg bg-info py-3">
<div class="container">
<a class="navbar-brand" href="#">Daily <span
class="text-white bg-primary rounded px-2 py-1">Updates</span></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class=" d-flex">
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class=" navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link fw-semibold " aria-current="page" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link fw-semibold text-dark" href="blog.html">Blog</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</header>
<section class="container my-5">
<h3 class="text-center text-light mb-5"> <span class="bg-primary px-5 py-1 rounded">Blog</span></h3>
<div>
<div class="card mb-5">
<div class="card-header">
<h5 class="fw-semibold">What's The difference between Var, Let & Const in Javascript?</h5>
</div>
<div class="card-body">
<p> Let's See some difference between var, let and const :</p>
<br>
<p><b>Var:</b> The scope of a var variable is functional scope.It can be updated and re-declared
into
the scope.It can be declared without initialization.It can be accessed without initialization as
its default value is “undefined”.</p>
<p><b>Let:</b> The scope of a let variable is block scope.It can be updated but cannot be
re-declared into
the scope.It can be declared without initialization.It cannot be accessed without initialization
otherwise it will give 'referenceError'.</p>
<p><b>Const:</b> The scope of a const variable is block scope.It cannot be updated or re-declared
into the
scope.It cannot be declared without initialization.It cannot be accessed without initialization,
as it cannot be declared without initialization.</p>
</div>
</div>
<div class="card mb-5">
<div class="card-header">
<h5 class="fw-semibold">What's the difference between arrow function and regular function?</h5>
</div>
<div class="card-body">
<P><b>Regular Function:</b> <br>
1. In a regular function, there is an arguments local variable. If the
number of arguments to our function is dynamic, using arguments allows us to easily do things
like calculating the maximum number of passed arguments.
<br>
2. In non-restrict mode, regular functions allow us to use duplicate named parameters. But in
strict mode, it is not allowed.
<br>
3. In a regular function, its internal this value is dynamic, it depends on how the function is
invoked.
</P>
<p><b>Arrow function:</b> <br>
1. In the arrow function, there are no arguments, if we access arguments in the arrow function
will return the arguments of the closest non-arrow parent function.
<br>
2. In arrow functions, parameters with the same name are not allowed whether the strict mode is
enabled or not.
<br>
3. In the arrow function, there are no this, if we access this in the arrow function it will
return the this of the closest non-arrow parent function.
</p>
</div>
</div>
<div class="card">
<div class="card-header">
<h5 class="fw-semibold">What's the difference between map, forEach, filter and find?</h5>
</div>
<div class="card-body">
<p><b>Map:</b> When we want to transform elements in an array we can use .map().</p>
<p><b>ForEach:</b> When we need to execute a function for each individual element in an array
.forEach() is great option.</p>
<p><b>Filter:</b> When we want to select a subset of multiple elements from an array we cam use
.filter().</p>
<p><b>Find:</b>When we want to select a single element from an array we can use .find().</p>
</div>
</div>
</div>
</section>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"
crossorigin="anonymous"></script>
</body>
<footer class="py-5 bg-info">
<ul class="nav justify-content-center border-top pb-3 mb-3 pt-5">
<li><a target="_blank" href="https://www.facebook.com/"><i
class="fa-brands fa-facebook text-light fs-4"></i></a></li>
<li><a target="_blank" href="https://www.instagram.com/?hl=en"><i
class="fa-brands fa-instagram-square filled ps-3 text-light fs-4"></i></a></li>
<li><a target="_blank" href="https://www.linkedin.com/"><i
class="fa-brands fa-linkedin filled ps-3 text-light fs-4"></i></a>
</li>
</ul>
<p class="text-center text-muted ">Copyright @ 2023 All Rights Reserved.</p>
</footer>
</html>