Introduction to Object properties in JavaScript

Source: Internet
Author: User

<! DOCTYPE html>//What is the type of the object's properties? String        //if the object's property is not of the type of the string, it is implicitly converted to string        varobj = {}; //obj.tostring () = "[Object Object]"        //here, the object property is converted to a string and then set.obj[{}] = 123; Console.log (obj[{}]); //123Console.log (obj["[Object Object]"]);//123        //obj["name"] = "123";        //Console.log (obj["name1"]);        //the question is converted to: two objects when toString is the same        //Console.log (({}). ToString ());        //Console.log (({}). ToString ());        //Console.log ({}). tostring () = = = ({}). tostring ());//True        /*the//reference type compares the address, so unless the two objects are the same object//otherwise, do not phase in var O1 = {}; var O2 = O1;        At this point, the two objects are the same object var O2 = {};        Console.log ({} = = = {}); Console.log (O1 = = = O2);        True or False??? Console.log (O1 = = O2); True or False???*/</script></body>

Introduction to Object properties in JavaScript

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.