Tag: Learn by Practice

switch-conditional-statment-js

JavaScript Exercise 08: Switch Statement

In the last exercise, we’ve learn the if…else statement in JavaScript. Today, we are going to learn another conditional statement: the switch statement. The difference between if…else and switch statement is that switch is designed to handle more cases. Let’s take a look at the following example:
Read more

Tagged with: , , ,
Javascript Print Console.log

JavaScript Exercise 01, 02: Output

In this exercise, you will learn where to write your JavaScript code, the JavaScript console. And your first command: console.log().

Exercise 1.1. Where to write your JavaScript programs? Your browser!

One of the advantages of JavaScript is that you don’t need to install anything to begin with. It’s already in your browser. You can write programs directly in Google¬†Chrome.
Read more

Tagged with: , ,