JavaScript For Beginners
JavaScript For Beginners
2
CONTENTS
OVERVIEW
o Introduction to JavaScipt
o Output
o Variables
o Comments
o Data types
o Module 1 Quiz
BASIC CONCEPTS
o Math Operators
o Assignment Operators
o Comparison Operators
o Logical or Boolean Operators
o String Operators
o Module 2 Quiz
o Code Project
3
o Break and Continue
o Module 3 Quiz
o Code Project
FUNCTIONS
o User-Defined Functions
o Function Parameters
o Using Multiple Parameters with Functions
o The return Statement
o Alert, Prompt, Confirm
o Module 4 Quiz
o Code Project
OBJECTS
o Introducing Objects
o Creating Your Own Object
o Object Initialization
o Adding Methods
o Module 5 Quiz
o Code Project
CORE OBJECTS
o Arrays
o Other Ways To Create Arrays
o Array Properties & Methods
o Associative Arrays
o The Math Object
4
o The Date Object
o Module 6 Quiz
o Code Project
ECMASCRIPT 6
o Intro to ES6
o ES6 Variables and Strings
o Loops And Functions in ES6
o ES6 Objects
o ES6 Destructuring
o Rest & Spread
o ES6 Classes
o ES6 Map & Set
o More on ES6
o Module 8 Quiz
5
o Code Project
ANSWERS TO QUIZ
o Module 1 Answers
o Module 2 Answers
o Module 3 Answers
o Module 4 Answers
o Module 5 Answers
o Module 6 Answers
o Module 7 Answers
o Module 8 Answers
ANSWERS TO PROJECTS
6
WELCOME TO JAVASCRIPT
Have you ever visited a website that made you think…”Wow, this
website is really cool and interactive”? Well, JavaScript was probably
making it happen.
In this course, you will learn to coe with JavaScript, one of the
most popular programming languages that makes website interactive
and dynamic.
NOTE:
You can also use JavaScript to create mobile apps and games,
process data…and many more!
The Console:
JavaScript is a programming language that runs in web browsers.
Most websites use JavaScript and when things go wrong, web
developers use the console to investigate errors.
In this lesson, you will learn about the web developer’s main
weapon: the developer’s console.
7
NOTE:
Coding errors are not visible in the browser. Web developers use
the console to test codes and fix bugs.
Logging Messages:
The console is a part of the web browser. Logging(writing)
messages to the console is a good way to diagnose and troubleshoot
minor issues in your code.
You can use console.log() to write or log messages. In the
example code below, the message “All good, no errors” is sent to the
console.