Intro to Javascript

Intro to Javascript

JAVASCRIPT

Javascript is a programming language used in web development It is used to add interactivity to the website, also to create a website dynamically JavaScript is one of the 3 languages all web developers must learn:

  1. HTML to define the content of web pages
  2. CSS to specify the layout of web pages
  3. JavaScript to program the behavior of web pages.

In javascript, we can perform functions of both html & css. we can add styles to elements of html which we do by css, we can also create element or delete or update them like in html. In HTML, JavaScript code is inserted between <script> and </script> tags or we can add an external file by

<script src="myScript.js"></script>

In which myScript.js is filename and extension.

Data Types

In Javascript, we have different types of data which makes us store different types of values:

  • String - this makes us store alphabets/ words
  • Number - this is used to store numbers
  • Boolean - this has 2 values that is true or false
  • Array - we can store number of similar data types in 1 variable by putting it in [] bracket known as array
  • Objects - which stores values in values in curly bracket
  • Empty - whose values are nill
  • Undefined - which are not defined

Starting from scratch, In javascript we different things to perform different functions like We have - Functions - in which we write code to execute Loops - we have different types of loop which works on iterations ArrayMethods - through which we can perform many calculations on array data types StringMethods - to perform some specific tasks on string data types Date - we can put dates in our function using keyword Date Statements - we have few types of statements to check conditions Errors - we have different types of error which tells which error has occured Tools - like types of console functions to perform many tasks Test - we can implement tests to test any function Dom - by this we can manupulate our html and css files AddEventListeners - by which we add different functions on clicking different things Hof - high order functions which either accepts a function or returns a function Oop - we have object oriented programming which makes our work easier and many more things which i'll be explaining in my upcoming blog posts

So, this was the introduction part of javascript in which i told all the things that we have in it. In my next blog post i'll start from the basics of javascript.