JavaScript Operators Reference

JavaScript operators are used to assign values, compare values, perform arithmetic operations, and more. JavaScript Arithmetic Operators Arithmetic operators are used to perform arithmetic between variables and/or values. Given that y = 5, the table below explains the arithmetic operators: Operator Description Example Result in y Result in x Try it + Addition x = y […]

SPSS Basic Operators

SPSS basic operators are mainly used with IF, DO IF and COMPUTE. They work mostly as you’d expect but they do have a couple of surprises in store. No worries, we’ll walk you through. We’ll demonstrate how to get things done on the last 5 variables in hospital.sav. Before jumping into SPSS operators, we’ll first set 6 […]

JavaScript Comparison and Logical Operators

Comparison and Logical operators are used to test for true or false. Comparison Operators Comparison operators are used in logical statements to determine equality or difference between variables or values. Given that x = 5, the table below explains the comparison operators: Operator Description Comparing Returns Try it == equal to x == 8 false Try it » x […]

JavaScript Operators

Example Assign values to variables and add them together: var x = 5;         // assign the value 5 to x var y = 2;         // assign the value 2 to y var z = x + y;     // assign the value 7 to z (x + y) Try it Yourself » The assignment operator (=) assigns a value to a variable. Assignment var x = 10; Try […]