Advertisement
sissou123

Untitled

Oct 31st, 2023
750
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.64 KB | Source Code | 0 0
  1.  
  2.  
  3. function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } What is the JavaScript version of sleep()? In the w3school documentation for setTimeout
  4.  
  5. function sleep(ms) {
  6.   return new Promise(resolve => setTimeout(resolve, ms));
  7. }
  8.  
  9. window.addEventListener('load', async function() {
  10.     'use strict';
  11.     debugger;
  12.     const cells = document.getElementsByClassName("cDIES");
  13.  
  14.     for (var i = 0; i < cells.length ; i++) {
  15.         var cell = cells[i];
  16.         cell.click();
  17.     }
  18.     const currentDay = document.getElementsByClassName("cDIES  currentDay")[0];
  19.     currentDay.click();
  20.  https://cuty.io/emX3irzm67
  21.  
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement