# Values

Values are the raw data of your application. A value is a representation of an entity, which the program can manipulate. They are generally atomic units of data, but in some cases can be more complex, and even composed of other values.

There are multiple different sorts of values, and they are differentiated by what is known as a `type`. Examples of common types are:

### Strings

A string is a piece of text. Strings are denoted by words wrapped in quote marks. In Javascript, you can use three different kinds of quote marks

#### Single Quotes & Double Quotes

strings wrapped in `'single quotes'` and `"double quotes"` have not special behaviour to them and ultimately the choice between them comes down to the situation at hand, and style preferences

#### Backquotes

strings wrapped in backquotes have special behaviour in JavaScript in that they allow you to inject other values or [variables](/javascript/js-basics/variables.md) into your strings by wrapping them with `${}`. This is called a template string and it looks like this:

```
var myVariable = 'This is some text which I can inject';
var templateString = `My text is: ${myVariable}`;
```

### Numbers

#### Integers

Integers are full numbers with no decimals places

#### Floats

Floats are numbers with a decimal place, followed by a fraction. Floats are used when more precision is required

### Booleans

Boolean values are those which are either `true` or `false`. They are binary, and are often used for [conditional statements](/javascript/js-basics/conditional-statements.md)

### Arrays

an array is basically a list of other values. Arrays are denoted by the square brackets which surround them. the items in an array can be of any type, like so `['some text', 1, 2, 3.14, 'some more text']`. The comma separates each of the items, so in this case, the array contains 5 items.

### Objects

an Object is a collection of properties, where a property is an association between a name (or key) and a corresponding value. for example, consider the following: `{ myKey: 'my Value' }`. The values can be of any type, such as the ones listed above here. There are some limitations around what you can use as a key, but generally speaking if you stick with a short, descriptive (of the purpose of the value) word, You will generally do okay.

###


---

# 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://learning.pavey.dev/javascript/js-basics/values.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.
