JavaScript Tutorial

JavaScript Indexed Collections

The first of data structures are collections that has index and items in the collection can be accessed through indexes. What do we understand Collections? Groups of data in different forms are one of the fundamental data structures in most programming languages. In many cases, groups of data expressed through different data types are referred …

JavaScript Indexed Collections Read More »

JavaScript Functions Overview

The functions are building blocks of the JavaScript programming. A function in JavaScript is a block of statements that may or may not take inputs and return a value. Therefore, it appears that JavaScript functions are no different from functions in other programming languages. There are many difference between functions in other languages and JavaScript …

JavaScript Functions Overview Read More »

JavaScript Bitwise Operator

Bitwise operators are found in many programming languages like Java, C, C++ and so on. A bitwise operation is very similar to logical operators except that the operation take place at bit level at the computer. Also these type of programming scripts are very rare in JavaScript. But, for the sake of learning we shall …

JavaScript Bitwise Operator Read More »

JavaScript Logical Operator

Logical operator is one that compare two boolean operands and gives a boolean output. They are of high importance in computer science, especially in digital design and computer architectures. They operands of logical operator could be constants, variables of all types and expressions involving comparison operators. First, we must understand the working of these logical …

JavaScript Logical Operator Read More »

JavaScript Ternary Operator

JavaScript language supports a C style ternary operator, also called a conditional operator. Any variable can be assigned value based on boolean value of an expression. Syntax The new variable will get its value based on certain conditions, suppose the condition is true, then the value 1 will be assigned, otherwise value 2 will be …

JavaScript Ternary Operator Read More »

JavaScript Comparison Operator

The JavaScript comparison operator takes two operands and then compare it. The result of the comparison is a boolean value. The operands could be a number a string a boolean value or an object Usage and Syntax You can use comparison operator anywhere within the script, however, these are more popular in conditional blocks such …

JavaScript Comparison Operator Read More »

JavaScript Unary Operators

In JavaScript and many other programming languages such as Java, C++, etc, a unary operator is that which takes only one operand and perform certain operation on it. Syntax Unary Operators in JavaScript There are many unary operators in JavaScript programming . Here is a list with description. Operators Name Description + unary plus attempt …

JavaScript Unary Operators Read More »

JavaScript Assignment Operator

The JavaScript assignment operator assigns a value to a JavaScript variable.The value of a variable or an expression is assigned to another variable, the variable that receives the value is always on left hand side and expression whose value is assigned is on right hand side of the assignment operator. Syntax The JavaScript assignment operation …

JavaScript Assignment Operator Read More »

JavaScript typeof operator

In JavaScript, the typeof operator can check primitive types which you learned in the previous post. Let’s find out the data types of primitive types. There are two ways to use this operator. Numbers Numbers are integers, float type and NaN that we can check using typeof operator. String Strings are types that are either …

JavaScript typeof operator Read More »