Javascript Introduction

Javascript Introduction

Hi everyone, My name is Arinze Calistus. The purpose of this blog is to teach you all you need to know about JavaScript.

What is JavaScript ?

Javascript is a programming or scripting language that allows the implementation of features on web pages.

To better understand javascript, we must know the concept of HTML and CSS which we will not talk about here but I've got a playlist on youtube you might want to check out.

However, it's important to note that HTML are the building blocks if web pages. And CSS, is used for designing HTML elements. Javascript on the other hand is what implements the features on web pages.

Here is an example that will simplify what we are talking about.

<!DOCTYPE html>
<html>
<head>
   <title> Arizon code's</title>
   <style type="text/css">
      button {
         font-family: sans-serif;
         border: none;
         padding: 15px 30px;
         font-size: 20px;
         outline: none;
         margin: 10px;
      }
      #btn {
         background-color: rgb(23, 52, 89);
         color: #f8f9f9;
         box-shadow: .5px .5px 1px 2px #000000;
      }
   </style>
</head>
<body>
   <button id="btn"> Show a Dialog </button>

   <script type="text/javascript">
      document.getElementById("btn").onclick = function() {
         alert("I am a dialog box!")
      }
   </script>
</body>
</html>

You can go ahead and paste it in your code editor.

I hope you enjoyed this article follow for more. Peace!