A small introduction on programming with JavaScript. Read if you are looking to start with my documents.
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.
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.
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:
This will be related to the normal programming conceptual training. For people who have had programming experience before, this is optional.
However, for people who are new to getting into programming, this section is mandatory, as without it, you will be left clueless about what is happening in the other documents.
This will lead to JavaScript specific concepts, and functions to interact with the document, and to actually perform actions related to the web page. Comparatively smaller than the previous section, this section mostly acts like reference documents.
Here's how I plan to structure my JavaScript documents:
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.
script
tag:This works the same way as the CSS style
tag. Details about this will be mentioned in the next docs.
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:
F12
.DevTools
, and it is filled with features. Learning the DevTools is just another field you can say :)Console
tab in the DevToolsYou can try executing this JavaScript code and see the result:
alert("Welcome to JavaScript :)")