Eloquent JS Objects
The operator in can be used to test whether an object has a certain property. For example:
var chineseBox = {};
chineseBox.content = chineseBox;
console.log("content" in chineseBox); // TRUE
console.log('content" in chineseBox.content); //TRUE
Setting one object equal to another just creates a reference to that object. When one object is updated, so is the other since it is a reference and now the creation of a new object.
To test two different dates, you need to test their time values. So: wallFall1.getTime() == wallFall2.getTime();
Written by Brandon Turner
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#