-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript-es6.html
More file actions
401 lines (370 loc) · 24.1 KB
/
javascript-es6.html
File metadata and controls
401 lines (370 loc) · 24.1 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript/ES6</title>
<!-- Stylesheets -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link rel="shortcut icon" href="images/favicon.png" type="image/x-icon">
<link rel="icon" href="images/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Responsive -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="css/responsive.css" rel="stylesheet">
<!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script><![endif]-->
<!--[if lt IE 9]><script src="js/respond.js"></script><![endif]-->
</head>
<body>
<div class="page-wrapper">
<!-- Preloader -->
<div class="preloader"></div>
<!-- Main Header / Style Two-->
<header class="main-header">
<!-- Main Box -->
<div class="main-box">
<div class="auto-container">
<div class="outer-container clearfix">
<!--Logo Box-->
<div class="logo-box">
<div class="logo"><a href="index.html"><img src="images/Auflora-cropped.png" alt=""></a>
</div>
</div>
<!--Nav Outer-->
<div class="nav-outer clearfix">
<!-- Main Menu -->
<nav class="main-menu">
<div class="navbar-collapse collapse scroll-nav clearfix">
<ul class="navigation clearfix">
<li><a href="index.html">Home</a></li>
<li class="dropdown"><a href="full-tech.html">Solutions</a>
<ul>
<li><a href="backend.html">Backend Development</a></li>
<li><a href="frontend.html">Frontend Development</a></li>
<li><a href="dev-ops.html">Dev-Ops Development</a></li>
<li><a href="mobility.html">Mobility</a></li>
</ul>
</li>
<li class="dropdown"><a href="full-tech.html">Technologies</a>
<ul>
<li class="dropdown"><a href="backend.html">Backend Development</a>
<ul>
<li><a href="grails.html">Grails</a></li>
<li><a href="springBoot.html">Spring Boot</a></li>
<li><a href="springCloud.html">Spring Cloud</a></li>
<li><a href="micronaut.html">Micronaut</a></li>
<li><a href="jvm.html">JVM Languages (Java/Groovy/Kotlin)</a>
</li>
<li><a href="data.html">Hibernate/JPA/Gorm/Spring Data/Micronaut
Data</a></li>
</ul>
</li>
<li class="dropdown"><a href="javascript:void(0)">Forntend
Technologies</a>
<ul>
<li><a href="react.html">React</a></li>
<li><a href="typescript.html">TypeScript</a></li>
<li><a href="javascript-es6.html">JavaScript/ES6</a></li>
</ul>
</li>
<li class="dropdown"><a href="javascript:void(0)">Dev-Ops
Technologies</a>
<ul>
<li><a href="paas.html">Platform as a Service</a></li>
<li><a href="docker.html">Docker</a></li>
<li><a href="k8s.html">Kubernetes</a></li>
</ul>
</li>
<li class="dropdown"><a href="javascript:void(0)">Mobility</a>
<ul>
<li><a href="reactNative.html">React Native</a></li>
</ul>
</li>
<li class="dropdown"><a href="javascript:void(0)">Supporting
Technologies</a>
<ul>
<li><a href="amqp.html">RabbitMQ/Apache Kafka</a></li>
<li><a href="redis.html">Redis</a></li>
<li><a href="mysql.html">MySQL</a></li>
<li><a href="mongoDb.html">MongoDB</a></li>
<li><a href="hazelcast.html">HazelCast</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="about.html">About Us</a></li>
<li><a href="contact.html">Contact Us</a></li>
<li><a href="https://medium.com/techcret" target="_blank">Blog</a></li>
</ul>
</div>
</nav>
<!-- Main Menu End-->
<!--Other Links-->
<!-- <div class="other-links">
<a href="contact.html" class="theme-btn btn-style-one">Get Quote</a>
</div> -->
</div>
<!--Nav Outer End-->
</div>
</div>
</div>
</header>
<!--End Main Header -->
<!--Page Title-->
<section class="page-title" style="padding: 210px 0px 0px;">
<span class="left-curve"></span>
<span class="right-curve"></span>
<div class="auto-container">
<h1>JavaScript/ES6</h1>
<h3>ECMAScript 6 is also known as ES6 and ECMAScript 2015.</h3>
<br />
<h3>ECMAScript (ES) is a scripting language specification standardized by ECMAScript International. It
is used by applications to enable client-side scripting. Languages like JavaScript, Jscript and
ActionScript are governed by this specification.</h3>
</div>
<div class="image">
<img src="images/resource/javascript-es6.png" height="300" class="center-block" alt="React" />
</div>
</section>
<!--End Page Title-->
<!--Services Single Section-->
<section class="services-single-section">
<div class="auto-container">
<div class="row clearfix">
<!--Links Column-->
<div class="links-column col-md-4 col-sm-12 col-xs-12">
<div class="inner-column">
<ul class="service-list">
<li><a href="javascript:void(0)">CONST AND LET</a></li>
<li><a href="javascript:void(0)">ARROW FUNCTIONS</a></li>
<li><a href="javascript:void(0)">TEMPLATE LITERALS</a></li>
<li><a href="javascript:void(0)">DEFAULT PARAMETERS</a></li>
<li><a href="javascript:void(0)">ARRAY AND OBJECT DESTRUCTING</a></li>
<li><a href="javascript:void(0)">IMPORT AND EXPORT</a></li>
<li><a href="javascript:void(0)">PROMISES</a></li>
<li><a href="javascript:void(0)">REST PARAMETER AND SPREAD OPERATOR</a></li>
<li><a href="javascript:void(0)">CLASSES</a></li>
<li><a href="javascript:void(0)">MODULES</a></li>
</ul>
</div>
</div>
<!--Content Column-->
<div class="content-column col-md-8 col-sm-12 col-xs-12">
<div class="inner-column">
<h2>Also called JavaScript 6.</h2>
<div class="text">
<p>
JavaScript ES6 brings new syntax and new awesome features to make your code more
modern and more readable. It allows you to write less code and do more. ES6
introduces us to many great features like arrow functions, template strings, class
destruction, Modules… and more.
</p>
<div class="row clearfix">
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>const and let</h3>
<p>const is a new keyword in ES6 for declaring variables. const is more powerful
than var. Once used, the variable can’t be reassigned. In other words, it’s
an immutable variable except when it used with objects.</p>
</div>
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>Arrow functions</h3>
<p>The arrow function is really awesome, and makes your code more readable, more
structured, and look like modern code. The map function with arrows looks
more clear and readable than map in ES5. With ES6 you can write shorter and
smarter code. You can use the same with filter and reduce.</p>
</div>
</div>
<div class="row clearfix">
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>Template Literals</h3>
<p>Template literals or template strings are pretty cool. We don’t have to use
the plus (+) operator to concatenate strings, or when we want to use a
variable inside a string.</p>
</div>
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>Default parameters</h3>
<p>So, when you forget to write the parameter, it won’t return an undefined
error because the parameter is already defined in the default. So when you
run your function with a missed parameter, it will take the value of the
default parameter t, and it will not return an error!</p>
</div>
</div>
<div class="row clearfix">
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>Array and object destructing</h3>
<p>Destruction makes the assignment of the values of an array or object to the
new variable easier. With ES5, we have to assign each value to each
variable. With ES6, we just put our values within curly brackets to get any
property of the object.
</p>
</div>
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>Import and export</h3>
<p>Using import and export in your JavaScript application makes it more
powerful. They allow you to create separate and reusable components. It is
simple! export allows you to export a module to be used in another
JavaScript component. We use import to import that module to use it in our
component.</p>
</div>
</div>
<div class="row clearfix">
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>Promises</h3>
<p>Promises are a new feature of ES6. It’s a method to write asynchronous code.
It can be used when, for example, we want to fetch data from an API, or when
we have a function that takes time to be executed. </p>
</div>
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>Rest parameter and Spread operator</h3>
<p>The rest parameters are used to get the argument of an array, and return a
new array. The spread operator has the same syntax as the rest parameter,
but the spread operator takes the Array itself and not just the arguments.
We can use the Spread parameter to get the values of an Array, instead of
using a for loop or any other method.</p>
</div>
</div>
<div class="row clearfix">
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>Classes</h3>
<p>Classes are the core of object oriented programming (OOP). They make your
code more secure and encapsulated. Using classes gives your code a nice
structure and keeps it oriented.</p>
</div>
<div class="column col-md-6 col-sm-6 col-xs-12">
<h3>Modules</h3>
<p>In ES5 you would use <script> tags with IIFE, or some library like AMD,
while in ES6 you can expose your class with export.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!--End Services Single Section-->
<!--Footer Style One-->
<footer class="footer-style-one">
<!--Footer Upper-->
<div class="footer-upper">
<div class="auto-container">
<div class="row clearfix">
<!--Big Column-->
<div class="big-column col-lg-3 col-md-12 col-sm-12 col-xs-12">
<div class="footer-column">
<div class="footer-widget about-widget">
<div class="widget-inner">
<div class="logo"><a href="index.html"><img src="images/Auflora-cropped.png"
alt="TechCret Software"></a></div>
<div class="copyright">© 2022 All Rights Reserved</div>
</div>
</div>
</div>
</div>
<!--Big Column-->
<div class="big-column col-lg-9 col-md-12 col-sm-12 col-xs-12">
<div class="row clearfix">
<!--Footer Column-->
<div class="footer-column col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="footer-widget links-widget">
<div class="widget-inner">
<h3>Company</h3>
<div class="links">
<ul>
<li><a href="about.html">About us</a></li>
<li><a href="contact.html">Contact us </a></li>
</ul>
</div>
</div>
</div>
</div>
<!--Footer Column-->
<div class="footer-column col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="footer-widget links-widget">
<div class="widget-inner">
<h3>Resources</h3>
<div class="links">
<ul>
<li><a href="https://medium.com/techcret" target="_blank">Blog</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!--Footer Column-->
<div class="footer-column col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="footer-widget links-widget">
<div class="widget-inner">
<h3>Solutions</h3>
<div class="links">
<ul>
<li><a href="backend.html">Backend Development</a></li>
<li><a href="frontend.html">Frontend Development</a></li>
<li><a href="dev-ops.html">Dev-Ops Development</a></li>
<li><a href="mobility.html">Mobility</a></li>
</ul>
</div>
</div>
</div>
</div>
<!--Footer Column-->
<div class="footer-column col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="footer-widget follow-widget">
<div class="widget-inner">
<h3>Follow</h3>
<div class="social-links">
<ul class="clearfix">
<li><a href="https://www.facebook.com/techcret99/"
target="_blank"><span class="fa fa-facebook"></span></a>
</li>
<li><a href="https://twitter.com/techcret99" target="_blank"><span
class="fa fa-twitter"></span></a></li>
<li><a href="https://www.linkedin.com/company/techcret"
target="_blank"><span class="fa fa-linkedin"></span></a>
</li>
<li><a href="https://www.reddit.com/user/techcret"
target="_blank"><span class="fa fa-reddit"></span></a></li>
<li><a href="https://github.com/techcret99" target="_blank"><span
class="fa fa-github"></span></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</footer>
<!--End Footer Style One-->
</div>
<!--End pagewrapper-->
<!--Scroll to top-->
<div class="scroll-to-top scroll-to-target" data-target="html"><span class="fa fa-angle-double-up"></span></div>
<script src="js/jquery.js"></script>
<script src="js/appear.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/pagenav.js"></script>
<script src="js/jquery.scrollTo.js"></script>
<script src="js/jquery.fancybox.pack.js"></script>
<script src="js/owl.js"></script>
<script src="js/wow.js"></script>
<script src="js/validate.js"></script>
<script src="js/script.js"></script>
<!--Google Map APi Key-->
<script src="http://maps.google.com/maps/api/js?key=AIzaSyBKS14AnP3HCIVlUpPKtGp7CbYuMtcXE2o"></script>
<script src="js/map-script.js"></script>
<!--End Google Map APi-->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-147714055-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-147714055-1');
</script>
</body>
</html>