Difference between const <modulename> and var <modulename>

nativescriptcore
plugins

#1

Hi. I’ve just started out with NativeScript and gone through Playground tutorial. I have a question. What’s the difference in including a module in js file in following two ways?

const frameModule = require("ui/frame");
vs
var observableModule = require("data/observable");

i.e. using const vs var. I’ve used both of them being used in the tutorial.


#2

It’s covered in the basics of ES6.


#3

I know the difference between const and var. I’m asking what are the repercussions of using them for modules? How do they apply to modules?