Skip to content

Commit 1a0004d

Browse files
gengjiawenBridgeAR
authored andcommitted
repl: eliminate var in function _memory
PR-URL: #26496 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 788c57b commit 1a0004d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/repl.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ function _memory(cmd) {
13321332
letup=cmd.match(/[})]/g);
13331333
up=up ? up.length : 0;
13341334
dw=dw ? dw.length : 0;
1335-
vardepth=dw-up;
1335+
letdepth=dw-up;
13361336

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

0 commit comments

Comments
 (0)