From 419a7da5014e46804bdae24c8b3c4596beef12b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Arboleda?= Date: Wed, 20 Mar 2019 00:46:36 -0500 Subject: [PATCH] test: simplify for loop in test-buffer-zero-fill-cli.js PR-URL: https://github.com/nodejs/node/pull/26799 Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Yongsheng Zhang --- test/parallel/test-buffer-zero-fill-cli.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-buffer-zero-fill-cli.js b/test/parallel/test-buffer-zero-fill-cli.js index 91679498a1a560..2f3b243c470c3c 100644 --- a/test/parallel/test-buffer-zero-fill-cli.js +++ b/test/parallel/test-buffer-zero-fill-cli.js @@ -9,8 +9,8 @@ const SlowBuffer = require('buffer').SlowBuffer; const assert = require('assert'); function isZeroFilled(buf) { - for (let n = 0; n < buf.length; n++) - if (buf[n] > 0) return false; + for (const n of buf) + if (n > 0) return false; return true; }