JavaScript Operators
<!DOCTYPE html> <html> <body> <h2>The three operator arities</h2> <script> let n = 5; let negative = -n; // unary: one operand let total = n + 10; // binary: two operands let label = n > 0 ? "positive" : "not positive"; // ternary: three parts console.log(negative); // -5 console.log(total); // 15 console.log(label); // "positive" </script> </body> </html>