From 9ff4981ca2e6f274d3e89a6d1d21e7e015b93af9 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sat, 12 Oct 2013 03:15:08 -0400 Subject: [PATCH] More concise way of slicing off the last character --- acorn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acorn.js b/acorn.js index f966917221..436a156ff7 100644 --- a/acorn.js +++ b/acorn.js @@ -834,7 +834,7 @@ ch = input.charCodeAt(++tokPos); var octal = /^[0-7]+/.exec(input.slice(tokPos, tokPos + 3)); if (octal) octal = octal[0]; - while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, octal.length - 1); + while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1); if (octal === "0") octal = null; ++tokPos; if (octal) {