Merge pull request #5990 from marhyorh/upstream/insFix

fixed waypoint ins .hasOwnProperty([propname])
This commit is contained in:
Rex Schrader
2016-01-09 00:12:06 -08:00

View File

@ -3421,7 +3421,7 @@
"id": "567af2437cbaa8c51670a16c",
"title": "Testing Objects for Properties",
"description": [
"Sometimes it is useful to check if the property of a given object exists or not. We can use the <code>.hasOwnProperty([propname])</code> method of objects to determine if that object has the given property name. <code>.hasOwnProperty()</code> returns <code>true</code> or <code>false</code> if the property is found or not.",
"Sometimes it is useful to check if the property of a given object exists or not. We can use the <code>.hasOwnProperty(propname)</code> method of objects to determine if that object has the given property name. <code>.hasOwnProperty()</code> returns <code>true</code> or <code>false</code> if the property is found or not.",
"<strong>Example</strong>",
"<blockquote>var myObj = {<br> top: \"hat\",<br> bottom: \"pants\"<br>};<br>myObj.hasOwnProperty(\"top\"); // true<br>myObj.hasOwnProperty(\"middle\"); // false</blockquote>",
"<h4>Instructions</h4>",