Skip to content

Commit 1a0004d

Browse files
gengjiawenBridgeAR
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 788c57b commit 1a0004d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: lib/repl.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ function _memory(cmd) {
13321332
let up = cmd.match(/[})]/g);
13331333
up = up ? up.length : 0;
13341334
dw = dw ? dw.length : 0;
1335-
var depth = dw - up;
1335+
let depth = dw - up;
13361336

13371337
if (depth) {
13381338
(function workIt() {
@@ -1351,9 +1351,9 @@ function _memory(cmd) {
13511351
});
13521352
} else if (depth < 0) {
13531353
// Going... up.
1354-
var curr = self.lines.level.pop();
1354+
const curr = self.lines.level.pop();
13551355
if (curr) {
1356-
var tmp = curr.depth + depth;
1356+
const tmp = curr.depth + depth;
13571357
if (tmp < 0) {
13581358
// More to go, recurse
13591359
depth += curr.depth;

0 commit comments

Comments
 (0)