<sectionid="description"> Hay dos formas de acceder a las propiedades de un objeto: notación de puntos ( <code>.</code> ) Y notación de corchetes ( <code>[]</code> ), similar a una matriz. La notación de puntos es lo que usa cuando conoce el nombre de la propiedad a la que intenta acceder con anticipación. Aquí hay una muestra del uso de la notación de puntos ( <code>.</code> ) Para leer la propiedad de un objeto: <blockquote> var myObj = { <br> prop1: "val1", <br> prop2: "val2"<br> }; <br> var prop1val = myObj.prop1; // val1 <br> var prop2val = myObj.prop2; // val2 </blockquote></section>
<sectionid="instructions"> Lea los valores de propiedad de <code>testObj</code> usando la notación de puntos. Establezca la variable <code>hatValue</code> igual al <code>hat</code> propiedad del objeto y establezca la variable <code>shirtValue</code> igual a la <code>shirt</code> propiedad del objeto. </section>