Before we give you an answer, try to explain to us what you think the above line should do. Maybe when you try to explain it you will see why you can’t do this.
But just to be clear, the = operator is different in JS than it is in math.
In math it is saying “the thing on the left is the same on the right”. In math, it is commutative, that is, if a = b then b = a.
But in JS, the = means “take whatever is on the right side and store it in the variable of the left side”. In the original code, it is saying “take whatever processArg(7) evaluates to and store it in the variable processed”. How would the inverse of that work? How would you “take the variable processed and store it in whatever processArg(7) evaluates to”? How do we store a variable in a value? It’s supposed to be the other way around.
That is saying “store the string literal ‘Bob’ in the variable name.”
If it was commutative, it would be the same as saying, “store the variable name in the string literal ‘Bob’”. That is not the same thing and I’m not even sure what that would mean, in terms of memory.
The maths rules are the same, but = (single equal character) is already taken as an operator (for variable assignment), so is not available to be used in JS as the equivalent common maths symbol for equality. So “equality” is == and what is basically “exact equality” (triple barred equals, although it’s more specific than that in JS) is ===
Yes, that’s basically the idea. I think that there is also an additional subtle difference. In math, a = b is an assertion, saying that these are equal. In JS, a === b isn’t really an assertion, but is a question, “True or false? These things are equal?” and the whole thing will evaluate to true or false.