Blog 2) JavaScript Introduction

What have you learnt?

JavaScript can be injected inline into the HTLM file directly as lone as it is encased in a script tag which looks like <script></script>, or it can have its own its own script file that can used to store all the javaScript needed for the Website as long as the file has an extension .js

JavaScript can be used to create popup windows that the user will need to interact with in order proceed with the website. These popups can be created by writing alert(“Hello”); the output will display a popup as seen below.

Why have i learnt this?

JavaScript is a crucial component that can be used to add functionality to a given website. It has the power to add buttons, popup windows, forms and so much more that has not been discovered yet.

What is the point?

There are three components that work together to bring life to a website:

HTML: the purpose of html is to display the content on a webpage nothing more. All content you wish to see on the screen will need to written in the html document.

CSS: the cascading style sheet is responsible for the style of a website. Thanks to the CSS we can add things such as color and design much easier thanks to wonders of CSS.

JavaScript: now that both the content and style of a website are taken care off the javascript adds the function such as popup message boxes through alerts.

How did i learn this?

Before we applied our javascript to any website we started the basics through the console in our purfered web browser as seen below. The console in the web browser is the perfect place to try out javascript as the effects are seen instantly with no long lasting impact.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Design a site like this with WordPress.com
Get started