How to run JS on Native platforms?

Once we build the project in cocos creator for android/ios/desktop etc… then all the JS compiled to C++.
Suppose If I want to execute a javascript code downloaded from network, can I do that?
All the JS files should be in project before building the project right…we can’t run any JS downloaded from network?