aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/javascript/reference/errors/undefined_prop
diff options
context:
space:
mode:
authorMasahiro FUJIMOTO <mfujimot@gmail.com>2021-06-25 01:40:44 +0900
committerGitHub <noreply@github.com>2021-06-25 01:40:44 +0900
commitfa9d0b4ad49db970ba8707a4f6ab9ce17b5383b8 (patch)
tree393eb2ca37a645499036e6e1baee2bf0f2ec9529 /files/ja/web/javascript/reference/errors/undefined_prop
parentedcbfa42307307b620944e0aa4f6125d47e811eb (diff)
downloadtranslated-content-fa9d0b4ad49db970ba8707a4f6ab9ce17b5383b8.tar.gz
translated-content-fa9d0b4ad49db970ba8707a4f6ab9ce17b5383b8.tar.bz2
translated-content-fa9d0b4ad49db970ba8707a4f6ab9ce17b5383b8.zip
Web/JavaScript/Reference/Errors/P-V* を更新 (#1205)
* Web/JavaScript/Reference/Errors/P-V* を更新 2021/06/14 時点の英語版に同期 * スラッグを修正
Diffstat (limited to 'files/ja/web/javascript/reference/errors/undefined_prop')
-rw-r--r--files/ja/web/javascript/reference/errors/undefined_prop/index.html118
1 files changed, 59 insertions, 59 deletions
diff --git a/files/ja/web/javascript/reference/errors/undefined_prop/index.html b/files/ja/web/javascript/reference/errors/undefined_prop/index.html
index cb2ec02f1a..fa5c1e8067 100644
--- a/files/ja/web/javascript/reference/errors/undefined_prop/index.html
+++ b/files/ja/web/javascript/reference/errors/undefined_prop/index.html
@@ -1,59 +1,59 @@
----
-title: 'ReferenceError: reference to undefined property "x"'
-slug: Web/JavaScript/Reference/Errors/Undefined_prop
-tags:
- - Errors
- - JavaScript
- - ReferenceError
- - Strict Mode
-translation_of: Web/JavaScript/Reference/Errors/Undefined_prop
----
-<div>{{jsSidebar("Errors")}}</div>
-
-<h2 id="メッセージ">メッセージ</h2>
-
-<pre class="syntaxbox">ReferenceError: reference to undefined property "x" (Firefox)
-</pre>
-
-<h2 id="エラータイプ">エラータイプ</h2>
-
-<p><a href="/ja/docs/Web/JavaScript/Reference/Strict_mode">strict モード</a> でのみ、{{jsxref("ReferenceError")}} の警告が出ます。</p>
-
-<h2 id="何がうまくいかなかったのか?">何がうまくいかなかったのか?</h2>
-
-<p>存在しないオブジェクトのプロパティにアクセスしようとしています。プロパティにアクセスする方法は 2 つあります。詳細については、<a href="/ja/docs/Web/JavaScript/Reference/Operators/Property_Accessors">メンバー演算子</a>参照ページを見てください。</p>
-
-<p>未定義プロパティを参照することによるエラーは、<a href="/ja/docs/Web/JavaScript/Reference/Strict_mode">strict モードのコード</a>でのみ発生します。非 strict コードでは、暗黙的に無視されます。</p>
-
-<h2 id="例">例</h2>
-
-<h3 id="無効なケース">無効なケース</h3>
-
-<p>このケースでは、"bar" は未定義のプロパティです。</p>
-
-<pre class="brush: js example-bad">"use strict";
-
-var foo = {};
-foo.bar; // ReferenceError: reference to undefined property "bar"
-</pre>
-
-<h3 id="有効なケース">有効なケース</h3>
-
-<p>エラーを避けるには、"bar" プロパティを定義するか、使用する前に "bar" プロパティが存在するか確認する必要があります(たとえば、{{jsxref("Object.prototype.hasOwnProperty()")}} メソッドを使用します)。</p>
-
-<pre class="brush: js example-good">"use strict";
-
-var foo = {};
-
-foo.bar = "moon";
-console.log(foo.bar); // "moon"
-
-if (foo.hasOwnProperty("bar") {
- console.log(foo.bar);
-}</pre>
-
-<h2 id="関連項目">関連項目</h2>
-
-<ul>
- <li><a href="/ja/docs/Web/JavaScript/Reference/Strict_mode">Strict モード</a></li>
-</ul>
+---
+title: 'ReferenceError: reference to undefined property "x"'
+slug: Web/JavaScript/Reference/Errors/Undefined_prop
+tags:
+ - Errors
+ - JavaScript
+ - ReferenceError
+ - Strict Mode
+translation_of: Web/JavaScript/Reference/Errors/Undefined_prop
+---
+<div>{{jsSidebar("Errors")}}</div>
+
+<h2 id="メッセージ">メッセージ</h2>
+
+<pre class="syntaxbox">ReferenceError: reference to undefined property "x" (Firefox)
+</pre>
+
+<h2 id="Error_type">エラーの種類</h2>
+
+<p><a href="/ja/docs/Web/JavaScript/Reference/Strict_mode">strict モード</a> でのみ、{{jsxref("ReferenceError")}} の警告が出ます。</p>
+
+<h2 id="何がうまくいかなかったのか?">何がうまくいかなかったのか?</h2>
+
+<p>存在しないオブジェクトのプロパティにアクセスしようとしています。プロパティにアクセスする方法は 2 つあります。詳細については、<a href="/ja/docs/Web/JavaScript/Reference/Operators/Property_Accessors">メンバー演算子</a>参照ページを見てください。</p>
+
+<p>未定義プロパティを参照することによるエラーは、<a href="/ja/docs/Web/JavaScript/Reference/Strict_mode">strict モードのコード</a>でのみ発生します。非 strict コードでは、暗黙的に無視されます。</p>
+
+<h2 id="例">例</h2>
+
+<h3 id="無効なケース">無効なケース</h3>
+
+<p>このケースでは、"bar" は未定義のプロパティです。</p>
+
+<pre class="brush: js example-bad">"use strict";
+
+var foo = {};
+foo.bar; // ReferenceError: reference to undefined property "bar"
+</pre>
+
+<h3 id="有効なケース">有効なケース</h3>
+
+<p>エラーを避けるには、"bar" プロパティを定義するか、使用する前に "bar" プロパティが存在するか確認する必要があります(たとえば、{{jsxref("Object.prototype.hasOwnProperty()")}} メソッドを使用します)。</p>
+
+<pre class="brush: js example-good">"use strict";
+
+var foo = {};
+
+foo.bar = "moon";
+console.log(foo.bar); // "moon"
+
+if (foo.hasOwnProperty("bar") {
+ console.log(foo.bar);
+}</pre>
+
+<h2 id="関連項目">関連項目</h2>
+
+<ul>
+ <li><a href="/ja/docs/Web/JavaScript/Reference/Strict_mode">Strict モード</a></li>
+</ul>