From b6cc54d73f329c20ea413fb3faf87e885be4960f Mon Sep 17 00:00:00 2001 From: gagan-bhullar-tech Date: Sat, 7 Sep 2024 21:16:41 +0000 Subject: [PATCH] string invalid function argument fix --- .../javascript/reference/global_objects/string/at/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/javascript/reference/global_objects/string/at/index.md b/files/en-us/web/javascript/reference/global_objects/string/at/index.md index 456b13d325f81ed..fa707af452698cf 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/at/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/at/index.md @@ -34,8 +34,8 @@ The following example provides a function which returns the last character found ```js // A function which returns the last character of a given string -function returnLast(arr) { - return arr.at(-1); +function returnLast(str) { + return str.at(-1); } let invoiceRef = "myinvoice01";