There is a growing sentiment in the JavaScript community that ES6 classes are not awesome:
JavaScript is everywhere these days - from web apps to mobile applications and servers. Its popularity skyrocketed in the last few years, surpassing langua.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
"use strict";
var acme = {
emlpeado : {
ojos: "verdes",
pelo: "negro",
},
colorPelo: function() {
console.log(this.emlpeado.pelo);
},
colorOjos: function() {
console.log(this.emlpeado.ojos);
},
init: function() {
this.colorOjos();
this.colorPelo();
}
}
// acme.emlpeado.ojos = 'negros';
acme.init();
</script>
</body>
</html>