Skip to content

Commit d6bb9a8

Browse files
committed
Use const instead for let
1 parent 1bf7618 commit d6bb9a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

JavaScript/framework.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ api.vm = require('vm');
1111

1212
// Create a hash and turn it into the sandboxed context which will be
1313
// the global context of an application
14-
let context = { module: {}, console: console };
14+
const context = { module: {}, console };
1515
context.global = context;
16-
let sandbox = api.vm.createContext(context);
16+
const sandbox = api.vm.createContext(context);
1717

1818
// Read an application source code from the file
19-
let fileName = './application.js';
19+
const fileName = './application.js';
2020
api.fs.readFile(fileName, (err, src) => {
2121
// We need to handle errors here
2222

2323
// Run an application in sandboxed context
24-
let script = api.vm.createScript(src, fileName);
24+
const script = api.vm.createScript(src, fileName);
2525
script.runInNewContext(sandbox);
2626

2727
// We can access a link to exported interface from sandbox.module.exports

0 commit comments

Comments
 (0)