Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

what are ternary operators

// Conditional (Ternary) operators are a way to write if statements in a more compact way
// unary operators are used to change the value of a variable
// examples of unary operators are ++, --, !, typeof, delete
// binary operators are used to compare two values
// examples of binary operators are ==, ===, !=, !==, >, <, >=, <=, +, -, *, /, %

const value = 1 < 2 ? "yes" : "no"
console.log(value)
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #ternary #operators
ADD COMMENT
Topic
Name
8+5 =