JS - Operator precedence

by Rodwyn Moreno

HTML

<h1>Operator precedence and associativity</h1>
<p>
Operator precedence determines how operators are parsed concerning each other. Operators with higher precedence become the operands of operators with lower precedence.
</p>
<p>Associativity determines the direction which operators are evaluated.</p>

<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table" target="_blank">Precedence table</a>

CSS

* {
  font-family: sans-serif;
}

JavaScript

const users = {
	mario: {
  	age: 70,
    sex: 'male'
  },
  hector: {
  	age: 51,
    sex: 'male'
  }
};

thirdAge = 60;

const isThirdAge = age => {
	return age >= thirdAge;
}

//console.log(isThirdAge(users.mario.age), isThirdAge(users.hector.age));
//console.log(users.mario.age)