From 81e37417c5483194846732735878981c7ae4ab5c Mon Sep 17 00:00:00 2001 From: Alexey Alshenetsky Date: Sat, 29 Jun 2024 01:10:08 +0300 Subject: [PATCH] fix comma location in method signature to conform to the standard (#22057) * fix comma location in method signature to conform to the standard * [ru] update "Syntax" section in 'Web/JavaScript/Reference/Global_Objects/String/indexOf' --------- Co-authored-by: Leonid Vinogradov --- .../reference/global_objects/string/indexof/index.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/files/ru/web/javascript/reference/global_objects/string/indexof/index.md b/files/ru/web/javascript/reference/global_objects/string/indexof/index.md index b6a8bd6cd3fd99..3454c9679e4b7f 100644 --- a/files/ru/web/javascript/reference/global_objects/string/indexof/index.md +++ b/files/ru/web/javascript/reference/global_objects/string/indexof/index.md @@ -9,10 +9,13 @@ slug: Web/JavaScript/Reference/Global_Objects/String/indexOf Метод **`indexOf()`** возвращает индекс первого вхождения указанного значения в строковый объект {{jsxref("Global_Objects/String", "String")}}, на котором он был вызван, начиная с индекса `fromIndex`. Возвращает -1, если значение не найдено. +{{EmbedInteractiveExample("pages/js/string-indexof.html", "taller")}} + ## Синтаксис -``` -str.indexOf(searchValue, [fromIndex]) +```js-nolint +indexOf(searchString) +indexOf(searchString, position) ``` ### Параметры