Skip to content

Instantly share code, notes, and snippets.

@avifoxi
Created November 14, 2014 02:11
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 avifoxi/94a2a53af76d81dc1754 to your computer and use it in GitHub Desktop.
Save avifoxi/94a2a53af76d81dc1754 to your computer and use it in GitHub Desktop.
A Pen by Chris Coyier.
<h1 id="message"></h1>
class Greeter {
constructor(message) {
this.message = message;
}
greet() {
var element = document.querySelector('#message');
element.innerHTML = this.message;
}
};
var greeter = new Greeter('Hello, world!');
greeter.greet();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment