.trim()
method would work here, but you'll need to complete this challenge using regular expressions.
result
should equal to "Hello, World!"
'
testString: 'assert(result == "Hello, World!", ''result
should equal to "Hello, World!"
'');'
- text: You should not use the .trim()
method.
testString: 'assert(!code.match(/\.trim\(.*?\)/), ''You should not use the .trim()
method.'');'
- text: The result
variable should not be set equal to a string.
testString: 'assert(!code.match(/result\s*=\s*".*?"/), ''The result
variable should not be set equal to a string.'');'
```