Category Archives: JavaScript

JavaScript Tutorial

About JavaScript Tutorial

Welcome to your first day of learning JavaScript. This tutorial covers JavaScript from complete beginner to advanced level.

It is full of Examples, References, Syntax’s, Tips, Notes, Warning, Activities, etc.

What do you think JavaScript is?

JavaScript is an object-oriented programming (OOPs) but definitely not class based OOPs like Java, C++, etc.

OOPs is based on the concept of “Object” which contains data and function. Further, Function contains statement and instructions for the compiler to compile and give the output. 

JavaScript is a scripting language that is easy to implement as it can be easily integrated within HTML.

Warning:
You  must have basic knowledge of HTML before you learn JavaScript.

Why use JavaScript?

Learning JavaScript is important for students who want to make a career in Website Development.

We are here to help you learn JavaScript in real-world with real-time applications.

Advantage of using JavaScript

  1. Browser Compatibility – . All the major browsers like Google Chrome, Mozilla Firefox, Opera, Internet Explorer, Bing, etc supports JavaScript.
  2. Flexibility– JS is flexible to use as the coding is flexible. For example, the variables don’t need to be declared with data types. You use a single keyword to declare every kind of data type, i.e. “Var”.
  3. User-friendly– It is easy to code with JS.
  4. It is one of the most famous Scripting Languages and thus, programmers prefer JS as their choice. Learning JS helps with back end and front-end development. Node JS, jQuery, etc. are the frameworks where JS is used. 

Prerequisite - Requirements

Anyone can learn JavaScript but it is mandatory to have basic knowledge of HTML. We assume that you have a basic understanding of HTML before learning JavaScript.

If you are not familiar with HTML, it would be better to learn the basics of HTML first and then come back here.

Click Here to Learn HTML

Audience

Our target students are Beginners or Intermediate level.

It is ideally suited for those who wants to build their career in Website Development & Design.

What will you learn in this Tutorial?

We will make sure that this JavaScript will provide an in-depth explanation of each topic.

By the end of this tutorial, you will master JavaScript from Basic to Advanced level.

We request you to go through each topic thoroughly and we have at least one Activity at the end of every topic.

If you have doubt or wants to share anything will us, you can send it us and we will try our best to respond.

JavaScript Examples

The best part of learning JavaScript from us is that we have the “Run the Code” feature at the bottom of each example.

You can click on “Run the code” to execute our examples live in the browser.

Little coding for fun and learn - Basic example of JS

<!DOCTYPE HTML>
<html>
<body>
  <script>
    alert( 'Hello, world! Welcome to TutorialBrain!');
  </script>
</body>
</html>

Explanation of Example:

The output of the program is:
Hello,  world! Welcome to TutorialBrain!

And the output will print on the alert box. It will drop from the search box of the browser.

The Alert box will contain the message with the “Ok” button.

The alert() function is used to print the message in the alert box.

The alert box can be used to take input and give output.

Activity

Write a JavaScript Program to display or print “Thank you for Visiting us!” on the alert box.