aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/ja/web/javascript/reference/global_objects/string/charat/index.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/files/ja/web/javascript/reference/global_objects/string/charat/index.md b/files/ja/web/javascript/reference/global_objects/string/charat/index.md
index 3ad73ae7a8..81ebbdb815 100644
--- a/files/ja/web/javascript/reference/global_objects/string/charat/index.md
+++ b/files/ja/web/javascript/reference/global_objects/string/charat/index.md
@@ -103,10 +103,10 @@ function getWholeChar(str, i) {
throw 'High surrogate without following low surrogate';
}
var next = str.charCodeAt(i + 1);
- if (0xDC00 > next || next > 0xDFFF) {
- throw 'High surrogate without following low surrogate';
- }
- return str.charAt(i) + str.charAt(i + 1);
+ if (0xDC00 > next || next > 0xDFFF) {
+ throw 'High surrogate without following low surrogate';
+ }
+ return str.charAt(i) + str.charAt(i + 1);
}
// Low surrogate (0xDC00 <= code && code <= 0xDFFF)
if (i === 0) {
@@ -156,10 +156,10 @@ function getWholeCharAndI(str, i) {
throw 'High surrogate without following low surrogate'
}
let next = str.charCodeAt(i + 1)
- if (0xDC00 > next || next > 0xDFFF) {
- throw 'High surrogate without following low surrogate'
- }
- return [str.charAt(i) + str.charAt(i + 1), i + 1]
+ if (0xDC00 > next || next > 0xDFFF) {
+ throw 'High surrogate without following low surrogate'
+ }
+ return [str.charAt(i) + str.charAt(i + 1), i + 1]
}
  // Low surrogate (0xDC00 <= code && code <= 0xDFFF)