Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var module1 = (function() {
'use strict';
//private
let color = 'red';
// public
return {
price : 800
}
}());
console.log(module1.price); // 800
console.log(module1.color); // undefiend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment