Fix a typo

This commit is contained in:
K-Sato 2019-06-23 08:34:28 +09:00 committed by GitHub
parent 9b5c1c95ec
commit 6f61b7447d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,7 @@ alert( 'I*!*\'*/!*m the Walrus!' ); // *!*I'm*/!* the Walrus!
As you can see, we have to prepend the inner quote by the backslash `\'`, because otherwise it would indicate the string end. As you can see, we have to prepend the inner quote by the backslash `\'`, because otherwise it would indicate the string end.
Of course, that refers only to the quotes that are same as the enclosing ones. So, as a more elegant solution, we could switch to double quotes or backticks instead: Of course, that refers only to the quotes that are the same as the enclosing ones. So, as a more elegant solution, we could switch to double quotes or backticks instead:
```js run ```js run
alert( `I'm the Walrus!` ); // I'm the Walrus! alert( `I'm the Walrus!` ); // I'm the Walrus!