From 797a9c1623a180db430ff0e31e3f679b5abc3429 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 17 Mar 2020 16:59:20 -0400 Subject: [PATCH] Replace some `var`s with `const` and `let` because `var` is evil --- Code.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code.ts b/Code.ts index 2dcc90d..73f83d9 100644 --- a/Code.ts +++ b/Code.ts @@ -36,8 +36,8 @@ function copyBody( dest: GoogleAppsScript.Document.Body, index?: number ) { - var totalElements = source.getNumChildren(); - for (var j = 0; j < totalElements; ++j) { + const totalElements = source.getNumChildren(); + for (let j = 0; j < totalElements; ++j) { if (index) copyElement(source.getChild(j), dest, index + j); else copyElement(source.getChild(j), dest); }