The React Show cover image

What Actually Happens When You Call A Function?

The React Show

00:00

How to Call a Function With Arguments One and Two

The engine will actually store theargs and statements as tokens in an abstract syntax tree to get fancy here. In our environment object, we have a property named add and its value is another JavaScript object with the args property mapped to the array with the strings A and B in it in that order. The body of the function can be just the one statement return A plus B. We need to bind those values one to A and two to B when we call the function.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app