JSFiddle - React, Tailwind, and code Playground

by abeisgreat

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.17/angular.min.js"></script>

JavaScript

// Instance fields show up
console.log('-----Test 1------');
angular.forEach({$hi: "ho", hi: "ho"}, function (k, m) {console.log(k, m)})

// Instance fields still show up
q = function () {
    this.$hi = "ho";
    this.hi = "ho";
}

// Prototype fields will not
q.prototype.$method = "true"
q.prototype.method = "true"

console.log('-----Test 2------');
angular.forEach(new q, function (k, m) {console.log(k, m)})

// Fields added via defineProperty will not                                         
Object.defineProperty(q, "hidden", {value: undefined, writable: true});
q.hidden = "100";

console.log('-----Test 3------');
angular.forEach(new q, function (k, m) {console.log(k, m)})