# SelectionBounds Object

> Contains the start position and the length of a selection.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 24.0
- **Path:** DS Server > Reference > JavaScript API > SelectionBounds Object
- **280 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selectionbounds/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selectionbounds/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selectionbounds/llms-full.txt

---

### Description

Contains the start position and the length of a selection.

### Syntax

```javascript
{
   start: <number>,
   length: <number>
}
```

### Examples

The following example demonstrates `SelectionBounds` in a practical document-editing workflow. It contains the start position and the length of a selection.

```javascript
function inspectSelectionBounds(selectionBounds) {
    console.log("start:", selectionBounds.start);
    console.log("length:", selectionBounds.length);
}
```

---

## In This Section

- [Javascript: SelectionBounds.length Property](https://docs.textcontrol.com/ds-server/reference/javascript/selectionbounds/length-property/llms-full.txt): The length of the selection in characters.
- [Javascript: SelectionBounds.start Property](https://docs.textcontrol.com/ds-server/reference/javascript/selectionbounds/start-property/llms-full.txt): The 0-based start character position of the selection.

---

## Nearby

- **Previous:** [Javascript: Selection.shrinkFont Method](https://docs.textcontrol.com/ds-server/reference/javascript/selection/shrinkfont-method/llms-full.txt)
- **Next:** [Javascript: SelectionBounds.length Property](https://docs.textcontrol.com/ds-server/reference/javascript/selectionbounds/length-property/llms-full.txt)
