JavaScript Document 0 — Introduction

A small introduction on programming with JavaScript. Read if you are looking to start with my documents.

Table of contents:


What is JavaScript?

A programming language, used widely in web development. JavaScript can be as easy, or as complicated as you want. It runs easily with simple to undestand code, with only a few lines of code leaving visible results.

JavaScript is easy on limits, and tries its best not to send any error, and figure out things on its own. So, it becomes a little easy to work with, but advanced programming in JavaScript can be a bit of a problem. That is irrelevant at this point. Sometimes JavaScript acts surprisingly weird, but apart from that it is a usable language.

What can JavaScript do?

It can add functionality to a website. A simple explaination in one sentence. But that definitely leaves you clueless about what exactly it's capable of.

It can interact with the HTML and CSS of the page to act logically. It can also open some alert boxes, popup windows, and create fake links too.

There's a lot what JavaScript can do, and it's a long and fun journey getting used to it.

JavaScript Divisions

Now, for my documents, I will be dividing JavaScript into two sections. One of them will be related to regular programming, and the other one related to interaction with the document:

My Documents on JavaScript

Here's how I plan to structure my JavaScript documents:

Running JavaScript

Now, for the two categories, I will make use of two methods of running JavaScript. You are not limited to use them as how I mention, but they just make the work a bit faster.

  1. The Normal Method: script tag:

    This works the same way as the CSS style tag. Details about this will be mentioned in the next docs.

  2. The Browser Console Method:

    If you have used the console before, then you know what this means. But if you haven't, then it's not hard to pull out the console either:

    • While sitting in any browser tab, hit F12.
    • This will show a pane on the right side. This is called DevTools, and it is filled with features. Learning the DevTools is just another field you can say :)
    • Next, head over to the Console tab in the DevTools
    • This will open up an text input area. Any JavaScript you enter here, will be executed and the result will be displayed back into the console. All the errors and warnings of the page are also reported here.

      The DevTools Section of this page.

    You can try executing this JavaScript code and see the result:

    alert("Welcome to JavaScript :)")

Next: JavaScript Document 1