#I want to use a set of functions in one script in another script.

8 messages · Page 1 of 1 (latest)

plain pond
#

I want to do what is called "inheritance".

tawdry gyroBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

plain pond
#

Also, I have another question.
If I have a file "first.js" and "second.js" and the former is executed first, can I use variables created in const in second.js as well?

chrome pollen
#

from what i know, all files of the same type (client, server, startup) are loaded in the same scope, so anything from any of them is accessible in another, provided it's from the same type of script

small spire
#

das correct yes

#

which is why priority exists as well

frosty meteor
#

inheritance is not really achievable unless you use some workaround

#

Cuz class does not exist in KubeJS