What is JavaScript?

Within our very first JavaScript modulewe answer some basic questions like"what is JavaScript?" ,"what exactly does it look like?" , and"what could it do?" , before continuing to carrying you through your initial practical experience of writing JavaScript.

Before beginning this module, you do not require any prior JavaScript understanding, but you need to have some familiarity with HTML and CSS. You're advised to work through the subsequent modules prior to beginning on JavaScript:

  • Getting started using the Internet (which comprises a very basic JavaScript debut ).
  • Intro to HTML.
  • Intro to CSS.

A high-definition definition

JavaScript is a scripting or programming language which lets you implement complicated features on webpages - each time a webpage does more than simply sit and exhibit static information for you to look in -- showing timely content updates, interactive maps, animated 2D/3D images, scrolling movie jukeboxes, etc. -- you can bet that JavaScript is likely involved.

HTML is the markup language which we use to structure and give meaning to our internet content, such as specifying paragraphs, headings, and information tables, or copying videos and images from the webpage.

CSS is a language of design rules we use to use styling into our HTML content, such as setting background colours and fonts, and placing our articles in many columns.

(Ok, not all, however, it's amazing what you can achieve with a couple of lines of JavaScript code)

So what could it actually do?

From the preceding example for example, we request a new name to be input subsequently keep that title in a variable called title .

  • • Operations on parts of text (called"strings" in programming). From the preceding example we choose the series"Player 1:" and combine it into the title factor to produce the comprehensive text tag, e.g."Player 1: Chris".
  • • Running code in reaction to specific events happening on an internet page. We utilized a click on occasion in our case above to detect if the button has been clicked then run the code which updates the text tag.
  • • And a whole lot more!
    What's even more intriguing however is that the performance built in addition to this client-side JavaScript language.

APIs are readymade collections of code building blocks which allow a programmer to implement applications that could otherwise be difficult or impossible to execute. They do exactly the identical thing for programming which readymade furniture kits do to house construction - it's far simpler to choose ready-cut panels and twist them together to make a bookshelf than it would be to work out the layout , go and locate the suitable wood, cut each of the panels to the ideal dimensions and shape, locate the correct-sized screws, and afterward place them together to make a bookshelf.