# How to remove the first character of a string in JavaScript

> Learn how to remove the first character of a string in JavaScript with the slice() method, passing 1 as the argument, which returns a new unmodified string.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2020-04-21 | Topics: [JavaScript](https://flaviocopes.com/tags/js/) | Canonical: https://flaviocopes.com/how-to-remove-first-char-string-js/

Let's say you have a string, and you want to remove the first character in it.

How can you do so?

One easy solution is to use the `slice()` method, passing `1` as parameter:

```js
const text = 'abcdef'
const editedText = text.slice(1) //'bcdef'
```

Note that the `slice()` method does not modify the original string.

It creates a new string, this is why I assign it to a new variable in the above example.
