JavaScript – Switch Case

java script

You can use multiple if…else…if statements, as in the previous chapter, to perform a multiway branch. However, this is not always the best solution, especially when all of the branches depend on the value of a single variable. Starting with JavaScript 1.2, you can use a switch statement which handles exactly this situation, and it … Read more

JavaScript if else Statement

java script

While writing a program, there may be a situation when you need to adopt one out of a given set of paths. In such cases, you need to use conditional statements that allow your program to make correct decisions and perform right actions. JavaScript supports conditional statements which are used to perform different actions based … Read more

let us C : Start Learning C Programming

C Programming Tutorial

Before we can begin to write serious programs in C, it would be interesting to find out what really is C, how it came into existence and how does it compare with other computer languages. In this chapter we would briefly outline these issues. We will also learn four important aspects of any language are … Read more

JavaScript Control Structures (Loops and Branches).

javascript

JavaScript supports the following forms of if..else statement − if statement if…else statement if…else if… statement. if statement The if statement is the fundamental control statement that allows JavaScript to make decisions and execute statements conditionally. Syntax The syntax for a basic if statement is as follows − if (expression){ Statement(s) to be executed if … Read more

JavaScript Control Structures (Loops and Branches)

javascript

JavaScript supports the following forms of if..else statement − if statement if…else statement if…else if… statement. if statement The if statement is the fundamental control statement that allows JavaScript to make decisions and execute statements conditionally. Syntax The syntax for a basic if statement is as follows − if (expression){ Statement(s) to be executed if … Read more

Javascript Type of Operator

java script

The typeof operator is a unary operator that is placed before its single operand, which can be of any type. Its value is a string indicating the data type of the operand. The typeof operator evaluates to “number”, “string”, or “boolean” if its operand is a number, string, or boolean value and returns true or … Read more

Miscellaneous Operator

java script

We will discuss two operators here that are quite useful in JavaScript: theconditional operator (? 🙂 and the typeof operator. Conditional Operator (? 🙂 The conditional operator first evaluates an expression for a true or false value and then executes one of the two given statements depending upon the result of the evaluation. Sr.No Operator … Read more