Home › JavaScript Tutorial › JS operators
JS operators
Math, comparison and logic.
Arithmetic + - * / % **, comparison === !== < >, logic && || ! and the nullish operator ??.
Example code
<pre id='o'></pre>
<script>
let x=7;
o.textContent=[x%3,x**2,x===7,x>5&&x<10,null??'default'].join('\n');
</script>