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";