--- id: 64497da4062602213ecf32e7 title: Step 30 challengeType: 0 dashedName: step-30 --- # --description-- Because the `change` event is triggering on an `input` element, the element will have a `value` property that represents the current value of the input. Assign the `value` property of `element` to a new variable called `value`, and use `.replace()` to remove all whitespace. # --hints-- You should declare a `value` variable after your `element` variable. ```js assert.match(code, /const\s+update\s*=\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*const\s+element\s*=\s*event\.target\s*;?\s*(?:const|let|var)\s+value/); ``` You should use `const` to declare your `value` variable. ```js assert.match(code, /const\s+update\s*=\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*const\s+element\s*=\s*event\.target\s*;?\s*const\s+value/); ``` You should assign the `value` property of `element` to your `value` variable. ```js assert.match(code, /const\s+update\s*=\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*const\s+element\s*=\s*event\.target\s*;?\s*const\s+value\s*=\s*element\.value/); ``` You should call the `.replace()` method on the `value` property of the `element`. ```js assert.match(code, /const\s+update\s*=\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*const\s+element\s*=\s*event\.target\s*;?\s*const\s+value\s*=\s*element\.value\.replace\(/); ``` You should pass a regular expression to match whitespace to your `.replace()` method. Use the `\s` character class. ```js assert.match(code, /const\s+update\s*=\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*const\s+element\s*=\s*event\.target\s*;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\//); ``` You should make your regular expression global. ```js assert.match(code, /const\s+update\s*=\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*const\s+element\s*=\s*event\.target\s*;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g/); ``` You should pass an empty string as your second argument to the `.replace()` method. ```js assert.match(code, /const\s+update\s*=\s*(?:\(\s*event\s*\)|event)\s*=>\s*\{\s*const\s+element\s*=\s*event\.target\s*;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g\s*,\s*('|"|`)\1/); ``` # --seed-- ## --seed-contents-- ```html