From 5d8f62d6ab761960206c3f6ddf4992534fe9726f Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Wed, 27 Mar 2024 15:32:02 -0700 Subject: [PATCH] Editorial: swap order of steps in String.p.includes (#3300) --- spec.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec.html b/spec.html index 4242e20e9d..b272c6b8ab 100644 --- a/spec.html +++ b/spec.html @@ -34605,8 +34605,8 @@

String.prototype.includes ( _searchString_ [ , _position_ ] )

1. Let _len_ be the length of _S_. 1. Let _start_ be the result of clamping _pos_ between 0 and _len_. 1. Let _index_ be StringIndexOf(_S_, _searchStr_, _start_). - 1. If _index_ is not ~not-found~, return *true*. - 1. Return *false*. + 1. If _index_ is ~not-found~, return *false*. + 1. Return *true*.

If _searchString_ appears as a substring of the result of converting this object to a String, at one or more indices that are greater than or equal to _position_, this function returns *true*; otherwise, it returns *false*. If _position_ is *undefined*, 0 is assumed, so as to search all of the String.