Last active
May 24, 2023 20:23
-
-
Save andymagill/7e8a46bb846e14e0b240f3f1b8ce9413 to your computer and use it in GitHub Desktop.
Simple JS class for copiepasta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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