JavaScript

Conditional operator

Conditional (Ternary) Operator ‘?’ Conditional (Ternary) operator takes in three operands: a condition, question mark and an expression to execute if condition is truthy and an expression if condition is falsy. Syntax of the ternary operator: let variablename = condition ? value1 : value2; Condition is evaluated and if truthy, value1 is return otherwise value2. …

Conditional operator Read More »

JavaScript Variables

JavaScript variables Variables plays a key role in mastering javascript and other languages. They form the basics in how we store data and retrieve same data with accuracy. See variables as containers or a box, holding an information (data) inside it. In javascript, variables can be declared using let, var and const as you will …

JavaScript Variables Read More »