Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript Programming : Is dot [.] always an operator?

In JavaScript, is the dot . always an operator?

For example:

AnObject.aMethod()

Are there any examples where the dot . is not an operator?

like image 934
Raymon D. Raymond Avatar asked Dec 01 '22 06:12

Raymon D. Raymond


2 Answers

No.

  • "Strings."
  • /regular.expressions/
  • 1.2 // Numbers
  • // Comments.
like image 136
Quentin Avatar answered Dec 05 '22 06:12

Quentin


It's not an operator in numeric literals

var x = 12.5;
like image 45
Adam Rackis Avatar answered Dec 05 '22 05:12

Adam Rackis