Skip to content

Instantly share code, notes, and snippets.

@andymagill
Last active May 24, 2023 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andymagill/7e8a46bb846e14e0b240f3f1b8ce9413 to your computer and use it in GitHub Desktop.
Save andymagill/7e8a46bb846e14e0b240f3f1b8ce9413 to your computer and use it in GitHub Desktop.
Simple JS class for copiepasta
// Example Class
class Example {
// properties
// methods
constructor() {
var _self = this;
_self.init();
}
init() {
let examples= document.querySelectorAll('.example');
examples.forEach(function(example) {
// do all the stuff !
});
}
}
var example = new Example();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment