Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

4.6.3. Order of Operations¶

/*Due to an historical quirk, an exception to the left-to-right rule 
is the exponentiation operator **. A useful hint is to always use 
parentheses to force exactly the order you want when exponentiation 
is involved:*/

// the right-most ** operator is applied first
console.log(2 ** 3 ** 2)

// use parentheses to force the order you want
console.log((2 ** 3) ** 2)

//512
//64
Comment

PREVIOUS NEXT
Code Example
Javascript :: 4.8. Input with readline-sync¶ 
Javascript :: 5.2.1. Loose Equality With ==¶ 
Javascript :: open menu 
Javascript :: convert from python to javascript online 
Javascript :: bjsmasth upset 
Javascript :: discord.js slash commend 
Javascript :: correctly type checking objects in javascript 
Javascript :: class exists javascript 
Javascript :: 7.2. Bracket Notation¶ 
Javascript :: corousal in react 
Javascript :: three js div over orbitcontrol 
Javascript :: how to use javascript so the color box change color and then change back 
Javascript :: javamailsender schedular 
Javascript :: Using Math Functions in an IF statement 
Javascript :: how to resolve click for div logging as parent too, in react 
Javascript :: deez 
Javascript :: sequelize findall in array 
Javascript :: The Works of Archimedes 
Javascript :: send email using javascript and mailtrap 
Javascript :: textfield extjs retrinjir a 4 caracteres 
Javascript :: angular dynamic script loading 
Javascript :: queen of spain 
Javascript :: put text inside an object javascript 
Javascript :: map for id 
Javascript :: stop interval javascript 
Javascript :: add if condition in map react 
Javascript :: nuxt two props 
Javascript :: javascript multiple enventListeners in one 
Javascript :: axios post not sending file 
Javascript :: javascript array get element by index 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =