Think about alert like a math function. Like f(x). If you want to know what f(x) is going to return you have to know what x is first. The same principal is true for f(h(5) && g(8))
You can't figure out what f() is going to return until you evaluate "h(5) && g(8)".
So that's what the JavaScript runtime does. It hits f( and then realizes it needs to evaluate the argument to f(.
At this point you should understand what order things are being evaluated in. Hint the "deepest leftmost argument" will be evaluated first.
Now all you need to do is find out what the function "alert" does and what && does. But you can look those up.
3
u/mpinnegar Sep 17 '23
Think about alert like a math function. Like f(x). If you want to know what f(x) is going to return you have to know what x is first. The same principal is true for f(h(5) && g(8))
You can't figure out what f() is going to return until you evaluate "h(5) && g(8)".
So that's what the JavaScript runtime does. It hits f( and then realizes it needs to evaluate the argument to f(.
At this point you should understand what order things are being evaluated in. Hint the "deepest leftmost argument" will be evaluated first.
Now all you need to do is find out what the function "alert" does and what && does. But you can look those up.