DEV Community

Discussion on: ES6 Mini Crash Course: How to Write Modern JavaScript

Collapse
 
mehdiraash profile image
Mehdi Raash

I believe, operators need operand(s).

ECMA divided this topic to:

  1. Arithmetic Operators
  2. Comparison Operators
  3. Logical Operators
  4. Assignment Operators
  5. Conditional Operators
Thread Thread
 
chrisachard profile image
Chris Achard

Hm, interesting. Does the variable that the three dots are on not count as an operand? (I don't know what the formal definition is)

Thread Thread
 
mehdiraash profile image
Mehdi Raash

Somehow yes, but I think because this '...' thing introduced the time that syntactic sugar came up to JS so they tend to keep it as just helper syntax, some developers don't like it to be called as an operator because of other programming languages same debate.(some folks in this way would say one language has got more operators to another...:-))

Thread Thread
 
chrisachard profile image
Chris Achard

Got, it (I think :) ). Interesting! I wasn't aware of the debate over the "operator" word. Thanks :)