D
D
Daria Vorobieva2019-12-06 15:01:30
gmail
Daria Vorobieva, 2019-12-06 15:01:30

How to write a JavaScript function that hides every third email in gmail?

Hello everyone, I need to write a js function that will hide every third letter on gmail. I would be very grateful for your help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2019-12-06
@miraage

function processEmails(gmailClient) {
  let i = 0
  let email

  while ((email = gmailClient.read()) !== null) {
    if (++i % 3 === 0) {
      gmailClient.hide(email)
    }
  } 
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question