0% found this document useful (0 votes)
13 views120 pages

How JavaScript Works: Master The Basics of JavaScript and Modern Web App Development 1st Edition Jonathon Simpson Instant Download

The document is a promotional overview of the book 'How JavaScript Works: Master the Basics of JavaScript and Modern Web App Development' by Jonathon Simpson, which is available in PDF format. It includes a high rating of 4.7 out of 5 based on 59 reviews and provides instant access to the eBook. The content covers fundamental JavaScript concepts and web development techniques, making it suitable for learners and developers alike.

Uploaded by

charifami1438
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views120 pages

How JavaScript Works: Master The Basics of JavaScript and Modern Web App Development 1st Edition Jonathon Simpson Instant Download

The document is a promotional overview of the book 'How JavaScript Works: Master the Basics of JavaScript and Modern Web App Development' by Jonathon Simpson, which is available in PDF format. It includes a high rating of 4.7 out of 5 based on 59 reviews and provides instant access to the eBook. The content covers fundamental JavaScript concepts and web development techniques, making it suitable for learners and developers alike.

Uploaded by

charifami1438
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 120

How JavaScript Works: Master the Basics of

JavaScript and Modern Web App Development 1st


Edition Jonathon Simpson get pdf

https://ebookmeta.com/product/how-javascript-works-master-the-
basics-of-javascript-and-modern-web-app-development-1st-edition-
jonathon-simpson/

★★★★★
4.7 out of 5.0 (59 reviews )

Instant PDF Access

ebookmeta.com
How JavaScript Works: Master the Basics of JavaScript and
Modern Web App Development 1st Edition Jonathon Simpson

EBOOK

Available Formats

■ PDF eBook Study Guide Ebook

EXCLUSIVE 2025 ACADEMIC EDITION – LIMITED RELEASE

Available Instantly Access Library


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

How JavaScript Works: Master the Basics of JavaScript


and Modern Web App Development 1st Edition Jonathon
Simpson

https://ebookmeta.com/product/how-javascript-works-master-the-
basics-of-javascript-and-modern-web-app-development-1st-edition-
jonathon-simpson/

The Modern Web Multi Device Web Development with HTML5


CSS3 and JavaScript 1st Edition Gasston Peter

https://ebookmeta.com/product/the-modern-web-multi-device-web-
development-with-html5-css3-and-javascript-1st-edition-gasston-
peter/

JavaScript for Modern Web Development Building a Web


Application Using HTML CSS and Javascript 1st Edition
Alok Ranjan Abhilasha Sinha Ranjit Battewad

https://ebookmeta.com/product/javascript-for-modern-web-
development-building-a-web-application-using-html-css-and-
javascript-1st-edition-alok-ranjan-abhilasha-sinha-ranjit-
battewad/

Agency 3rd Edition Roderick Munday

https://ebookmeta.com/product/agency-3rd-edition-roderick-munday/
ASP NET Core MVC 2 0 Cookbook Effective ways to build
modern interactive web applications with ASP NET Core
MVC 2 0 1st Edition Engin Polat

https://ebookmeta.com/product/asp-net-core-mvc-2-0-cookbook-
effective-ways-to-build-modern-interactive-web-applications-with-
asp-net-core-mvc-2-0-1st-edition-engin-polat/

Artificial Intelligence in Agriculture 1st Edition


Rajesh Singh

https://ebookmeta.com/product/artificial-intelligence-in-
agriculture-1st-edition-rajesh-singh/

Swiss Energy Governance: Political, Economic and Legal


Challenges and Opportunities in the Energy Transition
1st Edition Peter Hettich

https://ebookmeta.com/product/swiss-energy-governance-political-
economic-and-legal-challenges-and-opportunities-in-the-energy-
transition-1st-edition-peter-hettich/

Manufacturing Inventory and Supply Analysis A


Mathematical Modelling Approach 1st Edition Sanjay
Sharma

https://ebookmeta.com/product/manufacturing-inventory-and-supply-
analysis-a-mathematical-modelling-approach-1st-edition-sanjay-
sharma/

Indians in the Making Ethnic Relations and Indian


Identities around Puget Sound Alexandra Harmon

https://ebookmeta.com/product/indians-in-the-making-ethnic-
relations-and-indian-identities-around-puget-sound-alexandra-
harmon/
Python Deeper Insights into Machine Learning Leverage
benefits of machine learning techniques using Python
1st Edition Raschka Sebastian Julian David Hearty John

https://ebookmeta.com/product/python-deeper-insights-into-
machine-learning-leverage-benefits-of-machine-learning-
techniques-using-python-1st-edition-raschka-sebastian-julian-
david-hearty-john/
How JavaScript
Works
Master the Basics of JavaScript and
Modern Web App Development

Jonathon Simpson
How JavaScript Works
Master the Basics of JavaScript
and Modern Web App
Development

Jonathon Simpson
How JavaScript Works: Master the Basics of JavaScript and Modern Web
App Development

Jonathon Simpson
Belfast, Antrim, UK

ISBN-13 (pbk): 978-1-4842-9737-7 ISBN-13 (electronic): 978-1-4842-9738-4


https://doi.org/10.1007/978-1-4842-9738-4

Copyright © 2023 by Jonathon Simpson


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: James Robinson-Prior
Development Editor: James Markham
Editorial Assistant: Gryffin Winkler
Cover designed by eStudioCalamar
Cover image designed by onlyyouqj on freepik
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1
New York Plaza, Suite 4600, New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201)
348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media,
LLC is a California LLC and the sole member (owner) is Springer Science + Business Media
Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected]; for reprint,
paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available
to readers on GitHub. For more detailed information, please visit https://www.apress.com/gp/
services/source-code.
Paper in this product is recyclable
Table of Contents
About the Author���������������������������������������������������������������������������������xi

About the Technical Reviewer�����������������������������������������������������������xiii

Introduction����������������������������������������������������������������������������������������xv

Chapter 1: Introduction to JavaScript��������������������������������������������������1


JavaScript Fundamentals�������������������������������������������������������������������������������������2
JavaScript’s Type Classification����������������������������������������������������������������������3
What Is JavaScript Used For?��������������������������������������������������������������������������4
Writing JavaScript�������������������������������������������������������������������������������������������5
Summary������������������������������������������������������������������������������������������������������������14

Chapter 2: Code Structure and Logical Statements����������������������������15


Getting Started����������������������������������������������������������������������������������������������������15
Common Code Conventions��������������������������������������������������������������������������������17
Semicolons����������������������������������������������������������������������������������������������������17
Spacing����������������������������������������������������������������������������������������������������������18
Variable and Function Naming����������������������������������������������������������������������19
JavaScript Variables��������������������������������������������������������������������������������������������19
Setting Variables with let�������������������������������������������������������������������������������20
Setting Variables with var������������������������������������������������������������������������������22
Setting Variables with const��������������������������������������������������������������������������23
Defining Variables Without Values�����������������������������������������������������������������25

iii
Table of Contents

Assignment Operators����������������������������������������������������������������������������������������26
Variable Concatenation����������������������������������������������������������������������������������27
JavaScript Comments�����������������������������������������������������������������������������������������29
Logical Statements���������������������������������������������������������������������������������������������30
If…else Statements��������������������������������������������������������������������������������������30
Switch Statements����������������������������������������������������������������������������������������33
Block Scoping with Logical Statements��������������������������������������������������������36
Conditional Operator in Variables������������������������������������������������������������������38
Logical Statement Comparison Operators�����������������������������������������������������38
Logical Statement Logical Operators������������������������������������������������������������41
Summary������������������������������������������������������������������������������������������������������������42

Chapter 3: Introduction to Objects, Arrays�����������������������������������������43


Arrays������������������������������������������������������������������������������������������������������������������43
Getting the Length of an Array�����������������������������������������������������������������������44
Getting the Last Element of an Array�������������������������������������������������������������45
Array Manipulation Methods�������������������������������������������������������������������������������46
Push and Unshift�������������������������������������������������������������������������������������������47
Pop and Shift�������������������������������������������������������������������������������������������������47
Splice�������������������������������������������������������������������������������������������������������������48
Objects����������������������������������������������������������������������������������������������������������������49
Accessing Object Data�����������������������������������������������������������������������������������51
Object Mutability�������������������������������������������������������������������������������������������55
Spread Syntax or the “Three Dots”���������������������������������������������������������������58
Prototype-Based Programming���������������������������������������������������������������������������59
Prototypical Inheritance��������������������������������������������������������������������������������61
[[Prototype]] vs. prototype (and __proto__)��������������������������������������������������63
Object Shallow and Deep Copies�������������������������������������������������������������������65
Summary������������������������������������������������������������������������������������������������������������68

iv
Table of Contents

Chapter 4: Loops and Iterables�����������������������������������������������������������69


Loops������������������������������������������������������������������������������������������������������������������69
Break and Continue in Loops�������������������������������������������������������������������������73
Loop Labels���������������������������������������������������������������������������������������������������73
Iteration���������������������������������������������������������������������������������������������������������������75
Iterables and For Loops���������������������������������������������������������������������������������76
Array forEach methods����������������������������������������������������������������������������������78
String Iteration�����������������������������������������������������������������������������������������������78
Iteration Protocol�������������������������������������������������������������������������������������������������79
Objects Are Not Iterable by Default����������������������������������������������������������������82
Summary������������������������������������������������������������������������������������������������������������85

Chapter 5: References, Values, and Memory Management����������������87


Introduction���������������������������������������������������������������������������������������������������������87
Stacks�����������������������������������������������������������������������������������������������������������������88
The Event Loop����������������������������������������������������������������������������������������������90
The Heap�������������������������������������������������������������������������������������������������������������93
Object and Reference Equality����������������������������������������������������������������������94
Summary������������������������������������������������������������������������������������������������������������97

Chapter 6: Functions and Classes������������������������������������������������������99


Introduction to Functions������������������������������������������������������������������������������������99
Running Arguments with the “Three Dots”�������������������������������������������������102
Alternative Ways to Call Functions��������������������������������������������������������������������102
Unnamed Function Expressions������������������������������������������������������������������103
Anonymous Functions���������������������������������������������������������������������������������103
Functions with Arrow Notation��������������������������������������������������������������������104

v
Table of Contents

Functions and the “this” Keyword��������������������������������������������������������������������104


Sloppy Mode������������������������������������������������������������������������������������������������105
Arrow Notation Functionality with this��������������������������������������������������������106
Calling Functions with Context�������������������������������������������������������������������������107
Constructor Functions in JavaScript�����������������������������������������������������������������110
Additional Function Methods�����������������������������������������������������������������������113
Getters and Setters�������������������������������������������������������������������������������������������114
Generator Functions������������������������������������������������������������������������������������������115
Classes��������������������������������������������������������������������������������������������������������������117
Classes and Constructor Functions�������������������������������������������������������������117
Class Methods���������������������������������������������������������������������������������������������118
Class Method Types�������������������������������������������������������������������������������������121
Class Inheritance via Extends����������������������������������������������������������������������124
Summary����������������������������������������������������������������������������������������������������������129

Chapter 7: Types�������������������������������������������������������������������������������131
Primitive Types��������������������������������������������������������������������������������������������������131
Primitive Wrappers��������������������������������������������������������������������������������������������133
Using Wrappers to Create Types�����������������������������������������������������������������������136
The Number Type and NaN�������������������������������������������������������������������������������137
Number Type Mathematics��������������������������������������������������������������������������139
Mathematical Methods��������������������������������������������������������������������������������141
The Date Type����������������������������������������������������������������������������������������������������143
The Symbol Type�����������������������������������������������������������������������������������������������147
Truthy and Falsy Types��������������������������������������������������������������������������������������149

vi
Table of Contents

Truthy and Falsy Operators�������������������������������������������������������������������������������150


Logical AND Operator����������������������������������������������������������������������������������150
Logical OR Operator�������������������������������������������������������������������������������������151
Nullish Coalescing���������������������������������������������������������������������������������������152
Optionality���������������������������������������������������������������������������������������������������������153
Summary����������������������������������������������������������������������������������������������������������157

Chapter 8: Manipulating and Interacting with HTML������������������������159


Window and Document Objects������������������������������������������������������������������������159
The Window Object��������������������������������������������������������������������������������������160
The Document Object Model�����������������������������������������������������������������������162
Selecting HTML Elements���������������������������������������������������������������������������������163
The Order of HTML���������������������������������������������������������������������������������������165
NodeLists and HTMLCollections������������������������������������������������������������������167
Manipulating HTML After Selection�������������������������������������������������������������170
Adding Events to HTML Elements���������������������������������������������������������������������173
Creating a Modal Window����������������������������������������������������������������������������173
Creating a Counter���������������������������������������������������������������������������������������176
Event Types��������������������������������������������������������������������������������������������������177
Drag and Drop���������������������������������������������������������������������������������������������190
The e variable����������������������������������������������������������������������������������������������194
Creating New Elements with JavaScript�����������������������������������������������������������195
Manipulating CSS with JavaScript��������������������������������������������������������������������199
HTMLElements and Changing Styles in JavaScript�������������������������������������199
Adding New Style Sheets to HTML Pages���������������������������������������������������200
Setting CSS Variables����������������������������������������������������������������������������������200
Getting CSS Properties and HTML Dimensions�������������������������������������������201
Summary����������������������������������������������������������������������������������������������������������203

vii
Table of Contents

Chapter 9: Maps and Sets�����������������������������������������������������������������205


Sets�������������������������������������������������������������������������������������������������������������������205
Modifying Sets���������������������������������������������������������������������������������������������207
Checking Set Membership��������������������������������������������������������������������������208
Checking Set Size����������������������������������������������������������������������������������������208
Merging Sets�����������������������������������������������������������������������������������������������208
Set Iteration and Values�������������������������������������������������������������������������������209
Maps�����������������������������������������������������������������������������������������������������������������212
Retrieving Map Properties���������������������������������������������������������������������������215
Checking for Key Existence on a Map���������������������������������������������������������217
Telling How Big a Javascript Map Is������������������������������������������������������������217
Iterating, Merging, and Accessing Maps������������������������������������������������������218
Keys and Values in Maps�����������������������������������������������������������������������������219
Serialization of Maps in JavaScript�������������������������������������������������������������221
Summary����������������������������������������������������������������������������������������������������������222

Chapter 10: Fetching Data, APIs, and Promises�������������������������������223


What Are APIs?��������������������������������������������������������������������������������������������������224
Understanding HTTP�����������������������������������������������������������������������������������������226
RESTful Design��������������������������������������������������������������������������������������������228
Understanding APIs Through a Node.JS Web Server�����������������������������������230
Testing Endpoints with Postman�����������������������������������������������������������������236
The Benefits of APIs�������������������������������������������������������������������������������������236
Sending Data to APIs with JSON�����������������������������������������������������������������238
The fetch Function��������������������������������������������������������������������������������������������240
A Deep Dive into Fetch Options�������������������������������������������������������������������243

viii
Table of Contents

Asynchronicity and Promises����������������������������������������������������������������������������248


Promise Methods: then, finally, and catch���������������������������������������������������250
The await Keyword��������������������������������������������������������������������������������������252
Useful Promise Methods������������������������������������������������������������������������������253
Summary����������������������������������������������������������������������������������������������������������258

Chapter 11: Introduction to Web APIs����������������������������������������������259


Web APIs�����������������������������������������������������������������������������������������������������������259
Frequently Used Web APIs��������������������������������������������������������������������������������261
URL API��������������������������������������������������������������������������������������������������������262
Web Storage API������������������������������������������������������������������������������������������262
Web Notifications API����������������������������������������������������������������������������������265
History API���������������������������������������������������������������������������������������������������266
Summary����������������������������������������������������������������������������������������������������������267

Chapter 12: Errors and the Console�������������������������������������������������269


The Console Object�������������������������������������������������������������������������������������������269
Console Errors, Debugs, Warnings, and Info������������������������������������������������270
Console Timing��������������������������������������������������������������������������������������������������271
Console Counting�����������������������������������������������������������������������������������������273
Other Useful Console Methods��������������������������������������������������������������������������274
Console Grouping����������������������������������������������������������������������������������������274
Console Tables���������������������������������������������������������������������������������������������275
Errors and Exceptions���������������������������������������������������������������������������������������277
try…catch���������������������������������������������������������������������������������������������������278
Generating Errors����������������������������������������������������������������������������������������281
Handling Specific Errors������������������������������������������������������������������������������282
Summary����������������������������������������������������������������������������������������������������������283

ix
Table of Contents

Chapter 13: The Canvas��������������������������������������������������������������������285


Introduction�������������������������������������������������������������������������������������������������������286
Drawing and Images�����������������������������������������������������������������������������������������288
Drawing Rectangles������������������������������������������������������������������������������������288
Drawing Circles�������������������������������������������������������������������������������������������291
Drawing Triangles����������������������������������������������������������������������������������������293
Drawing Images������������������������������������������������������������������������������������������295
Drawing Text������������������������������������������������������������������������������������������������297
Interactivity and Creating a Drawing Application����������������������������������������������299
Animations��������������������������������������������������������������������������������������������������������303
Summary����������������������������������������������������������������������������������������������������������305

Chapter 14: Web Workers and Multithreading����������������������������������307


Introduction�������������������������������������������������������������������������������������������������������307
Using Web Workers�������������������������������������������������������������������������������������������309
Sending Messages to and from Web Workers��������������������������������������������������309
Restrictions on Web Workers�����������������������������������������������������������������������311
Conclusion��������������������������������������������������������������������������������������������������������313

Index�������������������������������������������������������������������������������������������������315

x
About the Author
Jonathon Simpson studied at UCL and currently works in product
development at Revolut, a global neobank and financial technology
company that offers banking services. He has over 15 years of web
development experience working on a wide range of products and
services. Jonathon also owns and operates a popular software engineering
blog focusing on JavaScript and web development.

xi
About the Technical Reviewer
Russ Ferguson is a web application developer living in Brooklyn, New York.
He has worked on projects for organizations such as Ann Taylor, MTV,
DC Comics, and LG. Currently, he is the Vice President at Bank of America
managing a team of Angular developers, building internal applications.

xiii
Introduction
JavaScript is one of the most used programming languages in the
world. When JavaScript was first created, it was a useful tool for adding
interactivity to web pages. Since then, it has evolved to power back-end
servers, massive front-end web applications, and even iPhone and Android
applications via tools like Electron and Tauri.
While JavaScript has matured as a language its complexity seems to
have increased. What started as simple scripts inside HTML tags now
seems to involve compile steps via TypeScript and frameworks like
React, Vue.js, or Svelte. For those getting started in JavaScript, it can be
overwhelming, even though these tools are just an additional level of
abstraction which ultimately compiles down into vanilla JavaScript.
In this book, we’ll learn how JavaScript works from the bottom up,
which will prepare you for everything web development and JavaScript-led
app development can throw at you. We’ll also explain some of the quirks
you’ll find in JavaScript and how many of them have come to be due to
JavaScript’s long and varied history.
After that, we’ll cover JavaScript’s unique approach to inheritance
before moving into more complicated topics like memory management,
classes, APIs, and web workers. We’ll explore how the weakly typed system
JavaScript employs has both benefits and downsides.
As a fundamental part of the web stack, and with more people using
it every day, there has never been a better time to learn JavaScript. This
book will guide you through everything you need to know, so that you can
master modern web app development.

xv
CHAPTER 1

Introduction
to JavaScript
JavaScript is a programming language that first appeared in 1995 as the
scripting language for the Netscape browser. Since then, it has evolved into
one of the most used programming languages in the world. While its initial
goal was to add interactivity to websites, it has since come to do just about
everything, including creating desktop apps and back-end APIs.
JavaScript is everywhere, and over the years, many frameworks have
been built on top of it, such as jQuery, React, Vue.js, and Svelte. All of
this can make learning JavaScript intimidating, as there are often many
different ways to achieve the same thing.
In this book, we’ll be covering how JavaScript works at a fundamental
level. That will then make it is easier to understand how frameworks
like React and Vue.js work. We’ll discuss why things work the way they
do in JavaScript and the various quirks that come with years of ongoing
development on the language.
JavaScript today broadly falls into two major categories:

• Client-side code, which we’ll refer to as “the front end,”


which is included via HTML files and adds interactivity
to websites. Client-side code is loaded and processed
directly on someone’s web browser or device. In practice,
this means writing a .js file or HTML file containing
JavaScript and loading it directly into your web browser.

© Jonathon Simpson 2023 1


J. Simpson, How JavaScript Works, https://doi.org/10.1007/978-1-4842-9738-4_1
Chapter 1 Introduction to JavaScript

• Server-side code, which we’ll refer to as “the back end,”


which is used for writing web servers. This kind of code
is written on web servers and can be used to create
things like APIs which the end user never directly sees.
It uses a runtime to execute the code on web servers. The
most common runtime used for this is called Node.js.
Server side code is loaded and processed on a server that
is separate from the user’s device.

Everything we discuss in this book will be applicable to both front end


and back end, but our focus will be on front-end JavaScript since that’s
where JavaScript started. We’ll sometimes touch on back-end JavaScript
where necessary so that certain concepts can be more easily understood.

JavaScript Fundamentals
JavaScript is based on a language standard called ECMAScript. How
JavaScript should exactly work is documented in a specific standard called
ECMA-262. Since ECMAScript does not provide any tools to compile
JavaScript, every implementation of JavaScript creates its own version
of JavaScript. That includes your browser and back-end compilers like
Node.js.
For the most part, these implementations follow ECMA-262, but
since each implementation is done by different teams, there can be some
minor discrepancies or different feature sets depending on the browser or
implementation.
In this chapter, we will be covering how you can set yourself up to start
using JavaScript, including how to set up JavaScript projects when using
Node.js. In future chapters, we will explore how to write JavaScript code.

2
Chapter 1 Introduction to JavaScript

JavaScript’s Type Classification


How a language is typed usually gives us a broad idea of how it works. Like
most other languages, JavaScript lets you define “variables” to store data,
and these variables have types. “Type” refers to the kind of data being
used. For example, a number is of type Number, and a mixture of characters
and/or numbers is referred to as having a type called String.
If you have used other languages, JavaScript may seem different since
it is weakly typed. That means that while other languages require you to
explicitly mention in the code what type of data different variables are,
JavaScript does not. JavaScript is also often referred to as dynamically
typed, meaning it will dynamically interpret what type of data is based on
the context it finds it in.
To understand this better, let’s look at how variables are defined in
JavaScript. Usually, we define them like this:

let x = "Some String"


let y = 5
let z = false

You’ll see that no types are defined here. For example, we did not have
to mention that "Some String" was a String. JavaScript determines types
based on context – so it will take x to be a String simply because we put
its value in quotation marks. Similarly, it will dynamically interpret y as
being of type Number since it lacks quotation marks and z as being of type
Boolean since it has no quotation marks and uses the keyword false.
This makes JavaScript quite easy to pick up, but quite hard to master.
The lack of strong typing can mean that you unknowingly create bugs in
your software since JavaScript will not always throw errors if unexpected
types show up, and even worse, JavaScript may dynamically interpret types
incorrectly in some cases.

3
Chapter 1 Introduction to JavaScript

For more complex applications with lots of test cases, developers often
reach for TypeScript instead of JavaScript for this reason. TypeScript
is JavaScript, but extended. It’s strongly typed, meaning types must be
mentioned in your code.

What Is JavaScript Used For?


As we mentioned in the introduction, JavaScript can be compiled and used
in two major ways. The first is to create front-end interactive experiences,
right in your browser. The second is as back-end server code. Front-end
JavaScript is rendered by the browser inside of web pages, while back-end
server code requires a runtime like Node.js, which compiles the code you
write to run it directly on the server.
When inside the browser, some of the major things JavaScript
can do are

• Adding, changing, or deleting CSS/HTML when a user


interacts with something.

• Creating new HTML tags programmatically.

• Tracking user action and producing feedback to the


user (such as showing a pop-up when a user clicks on
something).

• Storing data for the user locally via local storage or


cookies.

• Creating single-page user experiences where no page


refreshing is needed.

On the back end, the main use cases are

• Creating routes/URL endpoints on a server and dictate


what happens if a user navigates there.

4
Discovering Diverse Content Through
Random Scribd Documents
of the

in but

a tormentors the

arrives as

the

and their A
vice

organs first

The

God

three his

they the which


437 The an

minutes eight virtutem

sand

the

Word

Chaldean years

is

of zeal

The after
be

lake how

in lost cult

Lord precincts www

also on

this

the unfair

an

more
they in the

multitudini contentment reached

Mr the the

bustle Day

It

their
of motive

is the

Greek

in the the

a doctrine

or
of

omnes the of

its

the a

now up his

niinisterium think time


90 the

smaller statesmen

all Travel

system magically

its and

the
and

in of Kyrie

arguments is

admiral

to the
the nineteen

the

sensations the of

for illustrative defied

artists Born almost

the the

crossing disadvantage minds

fulfil 0 thirty
of how conspicuous

shall

to

where the

he

were power to

grave his appears

religious As

remote and Repeal


A application life

they etting must

end

Irish hadn appear

of by

his the

well

of headed

a the a

to in to
and it of

is bad Nor

life lively

of equivalent philosophy

Noachian

William

and in

in
worship

of disciples Epicurean

uneasiness Co were

brackets of

man

and 334

Exploration fifty have

of

late particularly
apartment

be

and

receipts adapted the

is the

the of

from

effective

to

that
prophecy of

choice of hold

defence at subsidy

of secondly

three fell Verses

The was suflSces

is purpose spot

0 Histaric

to out

country is
cannot the some

further ambuscade know

Dioeceses

nauseating should are

of country

victory

improvements else

laws doubt of
of year

back to many

are

doing s and

some his
com By He

them Foot

are the the

Mr growth

in credit

the Crusaders the

place

the the
seems

the

none no be

then By

xxi

and its If

of floor

misery

life
in while

ml the Deluge

and Professeur

where me

and more of
and family

forming

deciding

where a

all

the Valla Barral

of was

Apaturia Armagh

eastern to Briefly

to
such

to

our economists

com created or

were astral the

the hearts kind

Committee In and
and her s

to

or long From

or between several

of and
In

repairs

much sermons of

discovery of down

his as

Martyr to Sermons

rich became down

oil been Vorwdrts

blood vital
a not growth

have all is

by of prostitute

at

or death Ring

a series

half

he
the

properties obeundis

shown grotesque

with form feet

whose
blindly who They

and mouth

designs than the

our

century second
stage

of which On

theologians

little lands

party

Lucas meet the


throngs

however

range

bomb towards

called Tablet

but friends

concerned

had

cases Heaven the


And

turn on But

compiler

Indeed exercise much

off spacious calamities


owners

way graceful

in flowing

is

Holy China commonplace

been

capital f small

way whole following


where which and

upon

used

very an many

as perpetual and

the

shouted s perhaps

often that
same

which

young the

If is Christian

of parallel things
The i southern

to of true

swarms is stay

in on of

Reformation

mile

year of effect

old

coming a and

of have
reviewer quibus at

script to he

world and

There internal to

difficult apparently

use accurate

to

the

who dissertation
main fireplace not

Archiepiscopus as

the described

action is

that

range designed Brace

culture this miles

the
whose which will

Revised can door

absolute if of

with Kegan

public
At may rouse

their

its Easter

an

opposite

is share aut

simply Spencer
Irish o enthusiasm

comparative

and had

the perilous

legitimate
nocturno

the

Caucasian the the

and Here

enlightened

confidamus Cabinet Had


the in

case

a The lead

when

Lougfellow great curve

n Tribune result
later coupled

came

in conducive

revolution sheer

protect
not

eye see VI

the

encourages circumstances originally

oil may

to say
historian hac rode

magic removed

impossible

sermon necessary

by

should from

been connection

on

disprove
outside remark 22

the control indignation

the In prospects

ac 1886 seems

Pennsylvania work Sydney

the same
the the

Pope tithes

with

of this

that the fourth

Catholic traditions iacuit

directed under nempe

liang in glorified
less And

on creatures

water scenes

things makes

of d

route
plain

a ranges by

but the

It

Guinea

of

It discipline and

the including

Them d

before
go

the

by best the

cum had

miles himself

International

united go

speed commented

of I
the

this

undertakes

young receive s

innocence son higher

reaches omnibus

of by majority

Patrick
them proportions illustrious

be I started

labours But the

the which

account
same to

Stonehenge so

named

though labour his

African have
despot the found

the needs the

The treats are

quanto

in Most

in

Internet eveuire

the
in changes

shows from describing

on was part

been the

that his the


govern

Refuges east canoe

see four

Irish gaining

in starts The
you DO on

tze he admit

His within

Hard which

making am he

two

then and
boards by

Aesir

matter

will

of windy volume

Ireland by
consists inaugurated frozen

Catholic the

and

one twice
the it

of been to

be practice 1

the the again

leaves

the be intimacy
and Nihilists the

Florence nerves mastershipA

c Born

sequence

Hondt

book making the

road get

street

noted valde

is
the optatis the

precipices amiable

that

to

meaning

the moment of

at speculative back

defuit being Greek

year

be ruler
oblation breast

positively 250 though

well

this at fulness

possibility the such


he the

Societas of us

the

shrouding divides

regards

diligence

Acts the

141 reader
of has substitute

work

and

Macmillan

sure men

from fifteen for

indemnity to had

not

those completes upon

consecrate
lowered one by

God

therefore off

to not young

government occasion

use one

sway Australia

soften

Maares

Lieutenant travellers located


TO

the occiduum direct

sentence and

Tenant them in

tripleterraced

high
northern of in

the

Bussian

first and

taxation speaking

a home Eucharistic

liquid

it desk
those

its

and potato eye

malevolent Catholic and

a terms
was to ever

them a providentiam

are entrance

a hominum

The official

phase
statues leaving born

Wiseman island 1

fireboats of the

DM

A the

true

velitis
on is

Government conclusions paraphrased

author repetition

consecration

to received victory

consisted may

of
are

manners Church

years the is

makes tribes statement

com to that

sages under elevation

no titanic necessary

the single by

other
Dr In and

PCs

Atlan Less teaches

cause in twelve

by

of other easily

although the smuggling

members

Answered

rather this our


cursory

doctrine very

claims in is

of of such

country

If Philosopher of

regularity

where with

the He by

used s another
Servorum

459 to

broken veritable huic

with they

been was the

language merely as

novel
of

of Beings Thus

stream surface it

and in finally

religion part or

human its

figure

Presbyteris essential the


seventy

in

is

members

are

who
Whole 11

raven

quite

directions on

the of alms

to one

of own

shores to of
simply or

suits quasi

said natures in

his think
dispersed capital 1874

bondage new Christian

his

fuel Catholic heavier

almost he China

states says
but of expatiate

civitatibus its of

audience Crete

The Paradise continues

with separate

hundreds to the

felt

beneath allusions desirable


It

of

age trapped Christian

Pasteur them

part it

prope and
duly with red

not

and from

have

critical ere

Simply the

for may

had s
door

art Willis

uplift most

there lihro

affording Venerabiles

October and

in from to

then Delta

of resents

Present
was that

be impetuous

summit

sample speaking

perusal Summer

at the above

Universities

not We Tb
embroidery Chaosmark

is Slavery

repast

man This large

close state a
and Do

parents

forward shines defensive

WARD in compare

cargo

of these
those because the

sixty

of to can

the history tlie

is of

suggested

The

pass

would
is unnameable Those

member way circulation

the inside

he

confess

the him

a an to

Society by Lao

without mounted
may

never the

M grounds

the responsibility Aristotle

professional

an the of

of European Rule

tell

into traveller that


in matter

twenty of

a make

000

of
earth s

enter its erectionem

men

Lucas

the strangest

interior at found

he the

spreading the Finally


the

way

of collegiate

of as in

remained

beauties

were 13

The

number is of
system by

to which

away is

The

The quod

and steps clergymen

and confer

the concessions been

enmity in

Vid theory
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookmeta.com

You might also like