Closed xxvxxr closed 2 years ago
https://github.com/odziem/nasa-project/blob/647fda4c30a6c14a453ec84ddab8d38e6b1624fa/server/src/models/planets.model.js#L22
The savePlanet function is declared in the same file, slightly further down. Functions in JavaScript are hoisted to the top of their scope so we can safely use them before they are declared.
https://github.com/odziem/nasa-project/blob/647fda4c30a6c14a453ec84ddab8d38e6b1624fa/server/src/models/planets.model.js#L22