Skip to content

Instantly share code, notes, and snippets.

@mauriciopoppe
Created May 3, 2016 23:56
Show Gist options
  • Save mauriciopoppe/87892ce1aac47ec0ff90540d0c546345 to your computer and use it in GitHub Desktop.
Save mauriciopoppe/87892ce1aac47ec0ff90540d0c546345 to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
var bob = {
_name: "Bob",
_friends: ["Pete", "Joe", "Larry"],
printFriends() {
this._friends.forEach(f =>
console.log(this._name + " knows " + f));
}
}
bob.printFriends()
{
"name": "esnextbin-sketch",
"version": "0.0.0"
}
"use strict";
var bob = {
_name: "Bob",
_friends: ["Pete", "Joe", "Larry"],
printFriends: function printFriends() {
var _this = this;
this._friends.forEach(function (f) {
return console.log(_this._name + " knows " + f);
});
}
};
bob.printFriends();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment