# Object Literals

In JavaScript, an object literal is a syntax for creating an object with a set of properties and their values. It is a concise way of creating a new object and setting its properties at the same time.

Here is an example of an object literal in JavaScript:

```javascript
const obj = {
  key1: value1,
  key2: value2,
  key3: value3
};
```

In this example, `obj` is an object with three properties: `key1`, `key2`, and `key3`. The values of these properties are `value1`, `value2`, and `value3`, respectively.

You can also use object literals to create nested objects. For example:

```javascript
const obj = {
  key1: value1,
  key2: {
    nestedKey1: nestedValue1,
    nestedKey2: nestedValue2
  },
  key3: value3
};
```

In this example, `obj` has a property `key2` that is itself an object with two properties, `nestedKey1` and `nestedKey2`.

Object literals are a powerful and convenient way to create and manipulate objects in JavaScript. They can be used to store data, to define functions, and to create complex data structures.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://demirels-organization.gitbook.io/javascript-tutorial/object-literals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
