While writing JS code ( For instance, a huge function that consists of multiple commands meant to interact with the Blockchain ) to talk to smart contracts ( Interactions like reading and writing to the Blockchain), why do we have to define the primary function as async, and also, why await keyword should be used at the beginning of the lines that refers to on-chain data?
In other words:
- What "async" "await" keywords simplify for us?
- If we define our primary function as "async" at which lines should we begin with "await"? At which lines do we not?