From 4419aedf299ed8873fb4e8e3736e0eb800d0b240 Mon Sep 17 00:00:00 2001 From: Todd Tanner Date: Thu, 25 Jul 2024 12:24:07 -0400 Subject: [PATCH] Fixed instanceof summary to better match instanceof page (#35062) * Fixed instanceof summary to better match instance of page * Update files/en-us/web/javascript/guide/expressions_and_operators/index.md --------- Co-authored-by: Joshua Chen --- .../web/javascript/guide/expressions_and_operators/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/javascript/guide/expressions_and_operators/index.md b/files/en-us/web/javascript/guide/expressions_and_operators/index.md index 401be30955e0143..74c24046c2d3cdd 100644 --- a/files/en-us/web/javascript/guide/expressions_and_operators/index.md +++ b/files/en-us/web/javascript/guide/expressions_and_operators/index.md @@ -1035,10 +1035,10 @@ The [`instanceof` operator](/en-US/docs/Web/JavaScript/Reference/Operators/insta if the specified object is of the specified object type. The syntax is: ```js-nolint -objectName instanceof objectType +object instanceof objectType ``` -where `objectName` is the name of the object to compare to `objectType`, and `objectType` is an object type, such as {{jsxref("Date")}} or {{jsxref("Array")}}. +where `object` is the object to test against `objectType`, and `objectType` is a constructor representing a type, such as {{jsxref("Date")}} or {{jsxref("Array")}}. Use `instanceof` when you need to confirm the type of an object at runtime. For example, when catching exceptions, you can branch to different exception-handling code depending on the type of exception thrown.