diff options
author | Stephan Unverwerth <s.unverwerth@gmx.de> | 2020-03-14 13:39:05 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-14 16:00:28 +0100 |
commit | 33890212918ff547d80ea549275765bc1d1fbd0c (patch) | |
tree | 2ca9391ba29a1146f41323632a64c026bc7106d2 /Base/home | |
parent | 644b4f420133d3945eca02d2734b7819e02f3c47 (diff) | |
download | serenity-33890212918ff547d80ea549275765bc1d1fbd0c.zip |
LibJS: Unescape strings in Token::string_value()
Diffstat (limited to 'Base/home')
-rw-r--r-- | Base/home/anon/js/strings.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Base/home/anon/js/strings.js b/Base/home/anon/js/strings.js index d707bf090d..74cf39785d 100644 --- a/Base/home/anon/js/strings.js +++ b/Base/home/anon/js/strings.js @@ -1,7 +1,12 @@ -var d = "Double quoted string"; -var s = 'Single quoted string'; -var e = "Escaped characters \n \" \t \\" +var d = "Double quoted string\n"; +print(d); +var s = 'Single quoted string\n'; +print(s) +var e = "Escaped characters \b \f \n \r \t \v \' \" \\ \n"; +print(e) var u = "Unterminated string - this is not possible in js" + this is not possible in js\n"; +print(u); -var u2 = 'This is neither +var u2 = 'This is neither\n +print(u2); |