1 2 3 4 5
Here’s a pretty contrived example of what I’m talking about.
Here’s the content if you’re too lazy to click on the source link
1 2 3 4 5 6 7 8
Note that main.js imports Car and Person and simulates a person entering a car and going.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Note that properties ‘on’ and ‘driver’ are arbitrarily private as an example to showcase that both privileged methods as well as prototyped methods work when imported into main.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
1 2 3 4 5 6