Skip to content

Instantly share code, notes, and snippets.

@martinadamsdev
Created April 20, 2020 16:43
Show Gist options
  • Save martinadamsdev/8fae91c1000440645bebb93ea276df28 to your computer and use it in GitHub Desktop.
Save martinadamsdev/8fae91c1000440645bebb93ea276df28 to your computer and use it in GitHub Desktop.
// class Test {
// constructor(a, b) {
// this.a = 0
// this.b = 1
// }
//
// say() {
// console.log('hello world!')
// }
// }
"use strict";
const Test = (function() {
function Test(a, b) {
this.a = a;
this.b = b;
}
let _proto = Test.prototype;
_proto.say = function say() {
console.log("hello world!");
};
return Test;
})();
let a = new Test(3, 9)
console.log(a);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment