From: Daniel Cousens Date: Tue, 11 Aug 2015 14:29:25 +0000 (+1000) Subject: declare i inline X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=b782fb8041dac849a617d22cee5eb259e163e1dd;p=buffer.git declare i inline --- diff --git a/index.js b/index.js index b5f4588..77d0f47 100644 --- a/index.js +++ b/index.js @@ -1406,9 +1406,8 @@ function utf8ToBytes (string, units) { var length = string.length var leadSurrogate = null var bytes = [] - var i = 0 - for (; i < length; i++) { + for (var i = 0; i < length; i++) { codePoint = string.charCodeAt(i) // is surrogate component