From b2835898c2f1b5a8aca608388274db4a5adabbd6 Mon Sep 17 00:00:00 2001 From: Lam Wei Li Date: Tue, 25 Jul 2023 11:21:01 +0800 Subject: [PATCH] revert compatibility --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 08f1e41..7b8149b 100644 --- a/index.js +++ b/index.js @@ -6,8 +6,8 @@ */ function trimEnd(str) { - let lastCharPos = str.length - 1; - let lastChar = str[lastCharPos]; + var lastCharPos = str.length - 1; + var lastChar = str[lastCharPos]; while(lastChar === ' ' || lastChar === '\t') { lastChar = str[--lastCharPos]; }