0

What will be the execution order, if there are more than one parentheses in arithmetical operation in JavaScript?

Please analyse the code below and tell me what is the execution order in following arithmetical operation, shown in code. https://code.sololearn.com/W3SNcAj9g1vG/?ref=app

28th Aug 2021, 7:32 AM
Himansh
Himansh - avatar
5 ответов
+ 2
(4+4)/(4*4)*(2+2) (4+4) = 8 (4*4) = 16 (2+2) = 4 8/16*4 (8/16)*4 (0.5)*4 2
28th Aug 2021, 7:49 AM
Vadivelan
+ 1
Vadivelan Thanks:)
28th Aug 2021, 9:02 AM
Himansh
Himansh - avatar
0
Vadivelan GReAt:)
28th Aug 2021, 7:56 AM
Himansh
Himansh - avatar
0
Vadivelan on that note, if there are more than one parentheses, the execution order is from left to right, evaluating all the parentheses, then the execution order will shift to the operator level, ie. Operator having more precedence will execute first, Sounds right?
28th Aug 2021, 8:02 AM
Himansh
Himansh - avatar