odziem / nasa-project

Node.js NASA Mission Control Final Project
178 stars 360 forks source link

Where is this coming in from? #1

Closed xxvxxr closed 2 years ago

xxvxxr commented 2 years ago

https://github.com/odziem/nasa-project/blob/647fda4c30a6c14a453ec84ddab8d38e6b1624fa/server/src/models/planets.model.js#L22

odziem commented 2 years ago

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.