# Javascript: TextChar.getChar Method

> Gets the value of the character.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TextChar.getChar Method
- **310 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textchar/getchar-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textchar/getchar-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textchar/getchar-method/llms-full.txt

---

### Description

Gets the value of the character.

### Syntax

```javascript
<void> TextChar.getChar(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the value of the character. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TextChar.getChar` in a practical document-editing workflow. It gets the value of the character.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function inspectChar(textChar) {
    textChar.getChar(
        function(result) {
            console.log("get char result:", result);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TextChar.getBounds Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textchar/getbounds-method/llms-full.txt)
- **Next:** [Javascript: TextChar.getNumber Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textchar/getnumber-method/llms-full.txt)
