From e96aa573d55cb3802ea34d0cae8a22f5bf95ce89 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 20 Jun 2021 00:29:11 +0900 Subject: Update files/ja/web/javascript/reference/errors/in_operator_no_object/index.html Co-authored-by: potappo --- .../ja/web/javascript/reference/errors/in_operator_no_object/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/ja/web/javascript/reference/errors/in_operator_no_object/index.html b/files/ja/web/javascript/reference/errors/in_operator_no_object/index.html index 08ef44d836..f1dc299993 100644 --- a/files/ja/web/javascript/reference/errors/in_operator_no_object/index.html +++ b/files/ja/web/javascript/reference/errors/in_operator_no_object/index.html @@ -36,7 +36,7 @@ TypeError: cannot use 'in' operator to search for 'x' in 'y' (Firefox, Chrome)
"Hello" in "Hello World";
 // TypeError: cannot use 'in' operator to search for 'Hello' in 'Hello World'
-

Instead you will need to use {{jsxref("String.prototype.indexOf()")}}, for example.

+

ここでは代わりに {{jsxref("String.prototype.indexOf()")}} を使う必要があります。

"Hello World".indexOf("Hello") !== -1;
 // true
-- cgit v1.2.3-54-g00ecf