Lights, camera, where is the Script? – JavaScript in short

We know HTML is all about editing, CSS is all about designing, what’s left you ask?

Well, JavaScript of course!

In other words, JS is the programming language of the web, we used HTML and CSS to create and design a webpage, but at this point, the page is “static”,

JS allows us to “breathe life” in it, making the webpage more interactive, and with it, much more dynamic.

By embedding JS in a HTML document we open doors to much more possibilities, making objects take a living responsive form, now we can define that each object can have attributes and different methods (functions) he can perform.

There are to ways in which we can embed JS in a HTML document :

  1. By an HTML tag In HTML, JavaScript code is inserted between <script> and </script> tags, we can write it in the <head> or <body> sections of the HTML page, even in both if you want to!
  2. External JavaScript – similar to CSS, we can use external JS files, external scripts are practical when the same code is used in many different web pages and we don’t want to make the webpage sloppy or we’re simply just lazy, to use an external script, put the name of the script file in the src (the source) attribute of a <script> tag, building the connection we need.
Embedding by importing an external JS file

We can define different, versatile behaviors a webpage will enact, create actual living animations and so on…

With the combination of HTML, CSS and JavaScript everything (well, almost) is possible!

We can use JS to develop browser games, we can use JS to build web servers and develop server applications, simply putting – want to work in anything related to the web? Learn JS.

Similar to other programming languages, we can use JS to :

  1. Store useful values inside variables. In the above example for instance, we ask for a new name to be entered then store that name in a variable called name.
  2. Operations on pieces of text (known as “strings” in programming), we can add labels, define String that will match a certain variable and so on.

There are even platforms that allows us to build web user interfaces via JS such as:

And there are many many more, just proving to us how popular and relevant the use of JS nowdays.

The possibilities are wide and vast, but, so are the ways it can harm us.

Did you know the most of the Injection Attacks against web-apps are done through inserting a code in the JavaScript language?

You can read more about Injection Attacks and other action movies villains on other articles found in this blog, because we in Kayran care about your safety and our tools will help you to avoid getting any unnecessary “Flu-Shots”.

Stay safe, choose Kayran.


You must have once wondered what HTTP means and what is the difference between that ugly word to HTTPS, and if not, then please read

Read More »

Browser Exploitation

We know that it’s possible to exploit weaknesses (or vulnerabilities) that exist in anything, from a certain code to the entire application, let’s talk about

Read More »