What do you mean by key value pairs?


You can also think of objects as combinations of key-value pairs (like arrays), only their keys don't have to be numbers like 0, 1, or 2: they can be strings and variables.

What does this sentence mean?

Replace this line with your code.


Objects are like connected arrays, the elements at the same index correspond to each other.

arr1 = [1];
arr2 = ["Cade"];

//Equal To

obj1 = {
1: "Cade"


i did not understand can you please tell me in a simple beginner language?


well objects can have keys, and values:

var obj = {
  1: "test",
  2: "how",
  3: "this",
  4: "works"

in this case, i use numbers (1 till 4) as key. They are keys of the object, then i have a bunch of strings which are values. I can now use the bracket notation to access a value with the responding key

If you don't remember this, you can always revisit the exercise where dictonary's are explained, and re-practice it


i understood it thanks!


keys are nothing but they are kinda like many variables(like in arrays) in objects right? and to access arrays we use 0,1,2 tc but in key it can be a string. is that correct?


keys can also be strings, either way, we can use the keys to access the value associated with it.


got it thanks! :slight_smile: :blush: