Objects - JSON

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Object literal

A colon-separated list of colon-separated name: value pairs, enclosed within braces {}

Property

A variable that stores information about an object.

Can users define new objects?

Yes

How do you create a string within a string in JSON?

You put single quotes on the outside, and single quotes on the inside.

Why is what AJAX stands for a misnomer?

because it doesn't only include XML

What are the five primitive values?

strings, numbers, booleans, undefined, null.

There has been a major move to JSON from XML since what?

AJAX was invented.

Object is defined how in Javascript?

Collection of properties

this is determined by how?

How a function is called.

How do you turn a JSON string into an object?

JSON.parse(whatyouwanttochange)

How do turn a JSON object into a sting?

JSON.stringify(whatyouwanttochange)

Property name

Javascript identifier (like a name), or a string.

JSON object is what?

Nothing more than a Javascript object literal, in the form of a string.

Describe the difference between javascript and JSON with property names

So property names in Javascript can either be without quotes or with quotes. They needs quotes only if the name isn't valid. An example is if it has a hyphen. However, all JSON property names need double quotes.

What object did ES6 add?

Symbol

Associative array

a data structure / object composed of a collection of of {key : value}

Property values are what?

any javascript value: string, numbers, booleans, arrays, functions, objects and so on.

Give examples of built-in objects

arrays, strings, functions, document, Math, Date, RegExp

Property explanation 2

association between a key and value

Quotes around property name are optional when?

if the name would be a legal javascript name.

If a property value is a function, it is known as what?

method

What are the five primitive values known as?

object


Kaugnay na mga set ng pag-aaral

Types Of Life Policies: STUFF I GOT WRONG

View Set