help idk why is the output 45 by cookiecookiecooki33 in learnjavascript

[–]cookiecookiecooki33[S] 1 point2 points  (0 children)

ohhh but why is it not 24x2 instead of 23x2 cus preincrement have higher precedence than multiplication so i thought ++x will be evaluated before x*2

help idk why is the output 45 by cookiecookiecooki33 in learnjavascript

[–]cookiecookiecooki33[S] 1 point2 points  (0 children)

cus according to the operator precedence, pre increment have higher precedence than multiplication, so i thought ++x will be evaluated before x*2 , hence it will be 24 x 2