You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text: "JavaScript is case-sensitive. use throw new Error(...).",
17
+
text_ja: "JavaScriptは大文字小文字を区別します。throw new Error(...)としてください。",
16
18
examples: [
17
19
[" Throw new Error(\"Division by zero is forbidden\");"],
18
20
[" THROW new Error(\"Division by zero is forbidden\");"],
@@ -26,6 +28,7 @@ info =
26
28
index: 0,
27
29
absent: "throw",
28
30
text: "Try using the throw keyword to raise an exception, E.g., throw new Error(\"Message\").",
31
+
text_ja: "throwキーワードを使って例外を投げてください。例: throw new Error(\"Message\")",
29
32
examples: [
30
33
[" return { success: false, message: \"Division by zero is forbidden\" };"],
31
34
[" return \"Division by zero is forbidden\" ;"]
@@ -35,6 +38,7 @@ info =
35
38
index: 1,
36
39
absent: "return",
37
40
text: "Use the return keyword to return the result of the division.",
41
+
text_ja: "returnキーワードを使って、割り算の結果を返してください。",
38
42
examples: [
39
43
[" a / b ;"]
40
44
],
@@ -43,6 +47,7 @@ info =
43
47
index: 1,
44
48
present: "{ (.*?)} ",
45
49
text: "Try simply returning the result of the division.",
50
+
text_ja: "シンプルに割り算の結果だけを返すようにしてください。",
46
51
examples: [
47
52
[
48
53
"throw new Error(\"Division by zero is forbidden\");",
@@ -58,6 +63,7 @@ info =
58
63
index: 2,
59
64
absent: String.raw`\s*try\s*{\s* `,
60
65
text: "Use a try block to catch any exceptions that might be thrown. It should look something like `try { ... } catch(err) {...}` (fill in the `...` sections).",
text: "When reporting the error, you need to report it in the catch block, which catches it as the variable `err`. Thus, you need to use `err.message` not `result` or `result.message`, since the error is in `err.message`. Note that the variable `result` is out of scope in the catch block anyway; it was declared in the try block.",
0 commit comments