Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 14, 2022 03:00 pm GMT

JavaScript 101:Introduction to modern JavaScript.

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.

global variable

Local variables -They are declared inside the function used in the current function

local variable

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:

  1. Single line comment

// this is single line comment.

  1. 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.

  1. Most popular programming language.
  2. JavaScript is versatile.
  3. 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.

  1. Eloquent JavaScript Marign Haverbeke

Eloquent JavaScript

2.JavaScript and jQuery Jon Duckett

JavaScript and jQuery

3.JavaScript in 8 hours. Yao Ray

JavaScript in 8 hours


Original Link: https://dev.to/mbugua70/javascript-101introduction-to-modern-javascript-2n3j

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To