What is JavaScript?

 Welcome to the InsideCode javascript course! in this newsletter we can examine javascript from a excessive degree, answering questions including “what’s it?” and “what can you do with it?”, and making sure you’re cozy with javascript’s cause.

A excessive-level definition

Javascript is a scripting or programming language that allows you to implement complicated features on net pages — on every occasion a web web page does extra than just sit down there and display static facts with a view to look at — displayingTimely content updates, interactive maps, lively 2nd/3D pictures, scrolling video jukeboxes, and many others. — you can guess that javascript might be involved. it is the third layer of the layer cake of popular net technology, two of which (html and css) we’ve included in tons extra element in different elements of the getting to know region.

What is JavaScript?
  • Html is the markup language that we use to structure and supply meaning to our web content material, for example defining paragraphs, headings, and records tables, or embedding photos and videos inside the web page.
  • Css is a language of fashion regulations that we use to apply styling to our html content, for example setting historical past colors and fonts, and laying out our content in a couple of columns.
  • Javascript is a scripting language that permits you to create dynamically updating content, manage multimedia, animatePhotos, and pretty plenty the entirety else. (ok, not the whole lot, however it’s miles terrific what you could attain with some lines of javascript code.)
The three layers build on top of each other nicely. allow’s take a simple textual content label as an example. we are able to mark it up the use of html to offer it structure and motive:

So what can it really do?

The core client-side JavaScript language consists of some common programming features that allow you to do things like:

  • 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.
  • Operations on pieces of text (known as “strings” in programming). In the above example we take the string “Player 1: ” and join it to the name variable to create the complete text label, e.g. ”Player 1: Chris”.
  • Running code in response to certain events occurring on a web page. We used a click event in our example above to detect when the button is clicked and then run the code that updates the text label.
  • And much more!

What is even more exciting however is the functionality built on top of the client-side JavaScript language. So-called Application Programming Interfaces (APIs) provide you with extra superpowers to use in your JavaScript code.

APIs are ready-made sets of code building blocks that allow a developer to implement programs that would otherwise be hard or impossible to implement. They do the same thing for programming that ready-made furniture kits do for home building — it is much easier to take ready-cut panels and screw them together to make a bookshelf than it is to work out the design yourself, go and find the correct wood, cut all the panels to the right size and shape, find the correct-sized screws, and then put them together to make a bookshelf.

They generally fall into two categories.

Scroll to Top