Skip to content

Commit ef767a2

Browse files
gengjiawenBethGriggs
authored andcommitted
repl: eliminate var in function _memory
PR-URL: #26496 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 600929d commit ef767a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/repl.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ function _memory(cmd) {
13191319
let up = cmd.match(/[})]/g);
13201320
up = up ? up.length : 0;
13211321
dw = dw ? dw.length : 0;
1322-
var depth = dw - up;
1322+
let depth = dw - up;
13231323

13241324
if (depth) {
13251325
(function workIt() {
@@ -1338,9 +1338,9 @@ function _memory(cmd) {
13381338
});
13391339
} else if (depth < 0) {
13401340
// Going... up.
1341-
var curr = self.lines.level.pop();
1341+
const curr = self.lines.level.pop();
13421342
if (curr) {
1343-
var tmp = curr.depth + depth;
1343+
const tmp = curr.depth + depth;
13441344
if (tmp < 0) {
13451345
// More to go, recurse
13461346
depth += curr.depth;

0 commit comments

Comments
 (0)