
JavaScript Comparisons
We know many comparison operators from maths. In JavaScript they are written like this: Greater/less than: a > b, a < b. Greater/less than or equals: a >= […]
We know many comparison operators from maths. In JavaScript they are written like this: Greater/less than: a > b, a < b. Greater/less than or equals: a >= […]
We know many operators from school. They are things like addition +, multiplication *, subtraction -, and so on. In this chapter, we’ll start with simple operators, then […]
Most of the time, operators and functions automatically convert the values given to them to the right type. For example, alert automatically converts any value to a […]
As we’ll be using the browser as our demo environment, let’s see a couple of functions to interact with the user: alert, prompt and confirm. 1. alert This one […]
A value in JavaScript is always of a certain type. For example, a string or a number. There are eight basic data types in JavaScript. […]
Most of the time, a JavaScript application needs to work with information. Here are two examples: An online shop – the information might include goods […]
For a long time, JavaScript evolved without compatibility issues. New features were added to the language while old functionality didn’t change. That had the benefit […]
The first thing we’ll study is the building blocks of code. 1. Statements Statements are syntax constructs and commands that perform actions. We’ve already seen […]
This part of the tutorial is about core JavaScript, the language itself. But we need a working environment to run our scripts and, since this […]
Code is prone to errors. You will quite likely make errors… Oh, what am I talking about? You are absolutely going to make errors, at least if […]
A code editor is the place where programmers spend most of their time. There are two main types of code editors: IDEs and lightweight editors. […]
This book is a tutorial. It aims to help you gradually learn the language. But once you’re familiar with the basics, you’ll need other sources. 1. […]
Let’s see what’s so special about JavaScript, what we can achieve with it, and what other technologies play well with it. 1. What is JavaScript? […]