---
id: 68e4276483b0c71658aab1cc
title: Step 4
challengeType: 1
dashedName: step-4
---

# --description--

Your `userInput` value has some extra spaces at both ends of the string. To create a new string with that whitespace removed, you can use the `trim()` method.  

Here is an example:

```js
const sentence = "  Learning about the trim method.  ";
sentence.trim(); // "Learning about the trim method."
```

Create a variable named `cleanedInput` and assign it the result of using the `trim()` method on the `userInput` variable.

# --hints--

You should have a `cleanedInput` variable.

```js
assert.exists(cleanedInput);
```

Your `cleanedInput` variable should be a string.

```js
assert.isString(cleanedInput);
```

You should assign `userInput.trim()` to your `cleanedInput` variable.

```js
assert.equal(cleanedInput, userInput.trim());
```

# --seed--

## --seed-contents--

```js
const userInput = "   Hello World!   ";
console.log("Original input:");
console.log(userInput);
--fcc-editable-region--

--fcc-editable-region--
```
