O GoConqr está de visual novo! Conte para nós o que você achou.

Módulo 2 de 14 · Mídia

Object Literal

Kostas Diakogiannis

Object Literal

Creating JS Objects

Objects are one of the 7 standard JS Data types and are heavily used to store multiple variables together. Objects are comprised from a set of key value pairs (syntax-wise like CSS). The key acts like a placeholder and the value is as usually the value this variable contains.

In the example above we have created an object to store information in one place, where otherwise we would have needed multiple variables. This object now holds information about a person. The pieces of information are the keys (or object's properties) and the values can be any JS data type (even other objects as we will see later on).

In order to access a specific piece of info now we need to console.log(jake.firstName) etc.

 

 

Instruções

Para avançar no curso, envie uma tentativa deste quiz. Você pode enviá-la depois da última pergunta.

Ir para o módulo escolhido

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?