Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update remove duplicates from using vars to lets #320

Merged
merged 1 commit into from
May 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions sheets/removingDuplicates/removingDuplicates.gs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
*/
function removeDuplicates() {
// [START apps_script_sheets_sheet]
var sheet = SpreadsheetApp.getActiveSheet();
var data = sheet.getDataRange().getValues();
let sheet = SpreadsheetApp.getActiveSheet();
let data = sheet.getDataRange().getValues();
// [END apps_script_sheets_sheet]
// [START apps_script_sheets_new_data]
var newData = [];
let newData = [];
// [END apps_script_sheets_new_data]
for (var i in data) {
var row = data[i];
var duplicate = false;
for (var j in newData) {
for (let i in data) {
let row = data[i];
let duplicate = false;
for (let j in newData) {
if (row.join() == newData[j].join()) {
duplicate = true;
}
Expand Down