Simplified JavaScript for Very Important Programmers The Fast Track to Mastering Essential JavaScript Concepts Ebenezer Don download
Simplified JavaScript for Very Important Programmers The Fast Track to Mastering Essential JavaScript Concepts Ebenezer Don download
https://ebookmeta.com/product/git-prodigy-mastering-version-
control-with-git-and-github-ebenezer-don/
https://ebookmeta.com/product/mastering-javascript-functional-
programming-1st-edition-federico-kereki/
https://ebookmeta.com/product/everyday-go-the-fast-track-for-
golang-alex-ellis/
https://ebookmeta.com/product/dead-west-matt-goldman/
Pharmacology: An Introduction 8th Edition Henry Hitner
https://ebookmeta.com/product/pharmacology-an-introduction-8th-
edition-henry-hitner/
https://ebookmeta.com/product/colditz-prisoners-of-the-castle-
ben-macintyre/
https://ebookmeta.com/product/oil-barrons-02-0-make-me-
shiver-1st-edition-marie-johnston/
https://ebookmeta.com/product/ios-animations-by-tutorials-
seventh-edition-setting-swift-in-motion-raywenderlich-tutorial-
team/
Affective Encounters An Ethnography of Everyday Life
Among Chinese Migrants in Zambia Di Wu
https://ebookmeta.com/product/affective-encounters-an-
ethnography-of-everyday-life-among-chinese-migrants-in-zambia-di-
wu/
Simplified JavaScript for Very
Important Programmers
The Fast Track to Mastering Essential
JavaScript Concepts
Ebenezer Don
This book is for sale at http://leanpub.com/vip-javascript
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Variables in JavaScript . . . . . . . . . . . . . . . . . . . . . 18
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Variable declaration and assignment . . . . . . . . . . . . 20
Variable naming rules and conventions . . . . . . . . . . 22
Arithmetic operators . . . . . . . . . . . . . . . . . . . . . 26
The Concatenation operator . . . . . . . . . . . . . . . . . 28
Assignment operators . . . . . . . . . . . . . . . . . . . . . 29
Comparison operators . . . . . . . . . . . . . . . . . . . . 30
Logical operators . . . . . . . . . . . . . . . . . . . . . . . 31
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
How to define functions in JavaScript . . . . . . . . . . . 33
The return keyword . . . . . . . . . . . . . . . . . . . . . . 34
Function Parameters vs Arguments . . . . . . . . . . . . . 36
More on the return statement . . . . . . . . . . . . . . . . 36
Anonymous functions . . . . . . . . . . . . . . . . . . . . 37
Multi-line return statements . . . . . . . . . . . . . . . . . 39
Arrow Functions . . . . . . . . . . . . . . . . . . . . . . . 40
Functions best practices . . . . . . . . . . . . . . . . . . . 41
JavaScript String Methods . . . . . . . . . . . . . . . . . . 42
JS Math functions . . . . . . . . . . . . . . . . . . . . . . . 44
Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Declaring and Initializing Arrays . . . . . . . . . . . . . . 48
Accessing and modifying Array Elements . . . . . . . . . 49
Array Length . . . . . . . . . . . . . . . . . . . . . . . . . 50
Array Methods . . . . . . . . . . . . . . . . . . . . . . . . 51
JavaScript Objects . . . . . . . . . . . . . . . . . . . . . . . . 76
Rules and Guidelines for creating objects . . . . . . . . . 77
Adding, modifying and Removing Properties . . . . . . . 82
Object.prototype . . . . . . . . . . . . . . . . . . . . . . . . 85
Object methods . . . . . . . . . . . . . . . . . . . . . . . . 87
Object destructuring . . . . . . . . . . . . . . . . . . . . . 90
CONTENTS
Conditional Statements . . . . . . . . . . . . . . . . . . . . . 94
Else-if statements in JavaScript . . . . . . . . . . . . . . . 94
Nested if statements . . . . . . . . . . . . . . . . . . . . . . 97
The Switch statement . . . . . . . . . . . . . . . . . . . . . 100
The ternary operator . . . . . . . . . . . . . . . . . . . . . 106
Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
The for Loop . . . . . . . . . . . . . . . . . . . . . . . . . . 109
The for...in loop . . . . . . . . . . . . . . . . . . . . . . . 113
The for...of loop . . . . . . . . . . . . . . . . . . . . . . . 115
The while Loop . . . . . . . . . . . . . . . . . . . . . . . . 117
The do...while Loop . . . . . . . . . . . . . . . . . . . . . 119
History of JavaScript
JavaScript was created by Brendan Eich in 1995 and was first
introduced with the release of Netscape Navigator 2.0, a popular
web browser at the time. JavaScript was initially called Mocha but
later renamed to LiveScript and then to JavaScript in an attempt
to take advantage of the buzz surrounding the Java programming
language.
JavaScript quickly gained popularity among web developers and be-
came supported by other major web browsers like Internet Explorer
and Safari. In 1996, JavaScript was standardized by the European
What is JavaScript and How Does it Work? 5
While HTML and CSS are important for defining the content and
appearance of a webpage, without JavaScript, it’s difficult to add
interactivity to your webpage that’ll make users love it. JavaScript
allows developers to build more sophisticated and engaging user
experiences, and it is a critical component of modern web develop-
ment.
What is JavaScript and How Does it Work? 6
Server-side programming
Game development
You can also use JavaScript to build browser-based games with tools
like Phaser and Babylon.js. These tools allow you to create 2D and
3D games that can be played in a web browser.
What is JavaScript and How Does it Work? 7
Data visualization
Robotics
You can use JavaScript to control and program robots using plat-
forms like NodeBots and Johnny-Five.
Machine learning
To run your JavaScript code, press the Enter key on your keyboard.
This will print the message “My name is Ebenezer Don” and
How to write and run JavaScript code 9
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.