Performed operations on the right of assigment operator

hi, maybe I am going in details too much but cant help myself but to ask

this is from Basic JavaScript: Storing values with assigment operator

If there are any calculations to the right of the `=` operator, those are performed before the value is assigned to the variable on the left of the operator.

if there is any calculations on the right of = operator (like let x = 2 + 3) those are performed before the value is assigned to the variable on the left of the operator… what value? it is simple like let x = 2 + 3… those adding up ,…2 and 3 …is performed before what? can anyone explain me that second part of sentence
tnx

it means that everything on the right is evaluated by the computer first
once that evaluation is complete, the result is stored in the variable

so in your example, 2+3 is evaluated first, and result 5 is stored

if I got ya,…
in syntax let x = 2 + 3 there is value 5 first in the air and then variable with identifier x comes up and they end up together like let x = 5; ?
can you type example of operation left from assigment operator, that is what confuses me, there is no operations, just declaration of variable and identifier…
tnx

hi again, I’m sorry but I just didn’t understand what you said or your follow up question.

if this was a Math equation like
y = 2 + 3
and someone asked you what is the value of y, what would you do to solve it?
The computer is doing the same thing.
it adds 2 to 3 and stores the result in y

logic, it confused me, I thought that there is some sort of possible operation on the left of operator, i missunderstood, sorry
tnx

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.