+91-7906818313 / +91-7500893874 Monday - Sunday 10:00am - 06:00pm
Basics of JavaScript | Use of JavaScript with HTML File

Basics of JavaScript | Use of JavaScript with HTML File

Basics of JavaScript | Use of JavaScript with HTML File

 

 

Do you want to learn Java Script?

Do you want to start JavaScript from basics?

Do you want easy to learn JavaScript?

You can make easy to learn JavaScript by this book. I will recommend you to buy this book to learn JavaScript.

You should also check these articles to learn JavaScript which are given below.

Introduction of JavaScript

Best Way to write JavaScript Code for HTML file

basics of javascript

If you have these questions in your mind then you are in right place. Here I will share my own thought and knowledge of JavaScript. In this article, we will start with the basics of JavaScript. First of all, we should know that these key points about JavaScript.

  • JavaScript is a programming language while HTML and CSS are not programming languages. We declare that what should show on a webpage like image, heading, paragraph etc. But HTML cannot take decisions. Thus HTML is not a programming language. And CSS is used for only decorating like border, background color, text color, text style etc. While JavaScript is a programming language. It can take decisions.
  • The statements of JavaScript are separated by semicolons.
  • JavaScript statements are composed of: Values, Operators, Expression, Keywords and Comments.

What are the Literals in JavaScript?

Absolute constants are called  literals.

  • 32.1 (Number)
  • 35 (Number)
  • “Hello” (String)

Literals are different from variables. Here we talk about absolute constants.

JavaScript Variables

  • Variables are used to store data values.
  • The var keyword is used to declare variables.

Ex.: var x=5;

Note: Here is not any garbage collection

JavaScript Operators

Operators are used to manipulate data and give a data as result.

  • 20-5
  • 3*6
  • 54/2
  • a=2

JavaScript Expressions

An expression is a combination of values, variables, and operators, which computes to a value.

A=25+14*21

Keywords in JavaScript

  • JavaScript has many keywords. As you saw above that var is a keyword.
  • As of now there are 63 keywords in JS.

Comments in JavaScript

  • Code after double slashes // or between /* and */ is treated as a comment.
  • Comments are ignored, and will not be executed.

Identifier Naming Rules

  • In JavaScript the first character must be a letter, an underscore (_), or a dollar sign ($).
  • Subsequent characters may be letters, digits, underscores or dollar signs.

Conclusion

In this article you read about Basics of JavaScript. You read JavaScript Literals, JavaScript operators, JavaScript Expressions, JavaScript Keywords, JavaScript Comments and Identifier naming rules. Thank you for reading this article till the end. I hope you love this article. If you love this article then you should show your love in the comment section below. And if you have any questions in your mind then you should write it on the comment section below.

Boost your JavaScript skills by this book.

Leave a Reply

Close Menu
Translate »