Replace some vars with const and let

because `var` is evil
This commit is contained in:
Adam Goldsmith 2020-03-17 16:59:20 -04:00
parent 61ff5a5cc7
commit 797a9c1623

View File

@ -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);
}