Everything that can be written in JavaScript will be written in JavaScript.
--Jon Duckett
PAGE CONTENT
Introduction.
What is JavaScript?
JavaScript is Object-Oriented Programming language.
JavaScript was invented by Brendan Eich in 1995.
It is commonly used with web browsers.
Get started with JavaScript.
To start learning JavaScript and be able to implement it in web browser. you need to start first buy knowing the basics of JavaScript.
Basics in JavaScript.
- Arrays
- Variables
- Functions
- Comments
- Data types
- Strings
- Object
- Keywords
Arrays
Arrays are special variable that can hold more than one value.
const books = ["java","javascript","Python"];
Variables
They are two type of variable in JavaScript:
1.Global variables.
2.Local variables.
Global variables -They are declared outside the function ,it can be used everywhere.
Local variables -They are declared inside the function used in the current function
Functions
A function is a code block that can repeat to run many times.
function function-name (){----your code----};
Data types.
Variables in JavaScript can hold different type of data type .
Example of data types in JavaScript:
- Numbers
- Strings
- Objects
- Objects
Comments
Comments are used to explain your code.
Types of Comments in JavaScript:
- Single line comment
// this is single line comment.
- multi line comment.
/*
this is a multi line comment.
*/
Why learn JavaScript?
JavaScript it's a very powerful programming language that you should consider to learn as your programming language.
This are the reasons why you should consider to learn JavaScript.
- Most popular programming language.
- JavaScript is versatile.
- Its in your browser.
Resources
Incase you want to start learning JavaScript but you don't know where to begin. Below are some of the books that will help you to master and learn JavaScript.
- Eloquent JavaScript Marign Haverbeke
2.JavaScript and jQuery Jon Duckett
3.JavaScript in 8 hours. Yao Ray
Top comments (2)
If you're more of a "hands on" learner, this Udemy course from Jonas Schmedtmann is probably the best bang for your buck to learn JS: udemy.com/course/the-complete-java...
thank you so much