---
title: const
categories: |
core
version: 0.104.0
core: |
Create a parse-time constant.
usage: |
Create a parse-time constant.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
# `const` for [core](/commands/categories/core.md)
<div class='command-title'>Create a parse-time constant.</div>
## Signature
```> const {flags} (const_name) (initial_value)```
## Parameters
- `const_name`: Constant name.
- `initial_value`: Equals sign followed by constant value.
## Input/output types:
| input | output |
| ------- | ------- |
| nothing | nothing |
## Examples
Create a new parse-time constant.
```nu
> const x = 10
```
Create a composite constant value
```nu
> const x = { a: 10, b: 20 }
```
## Notes
This command is a parser keyword. For details, check:
https://www.nushell.sh/book/thinking_in_nu.html