Как написано в описании циклов, с await может работать только for ofВ каком описании? С await прекрасно работает классический for.
function sleep(delayms) {
return new Promise((resolve) => setTimeout(() => resolve(), delayms));
}
async function foo() {
for (i = 0; i < 10; i += 1) {
await sleep(1000);
console.log(i);
}
return 'done';
}
await foo();
// 0
// 1
// ...
// 9
// "done"
A cookie with the Secure attribute is only sent to the server with an encrypted request over the HTTPS protocol. It's never sent with unsecured HTTP (except on localhost), which means man-in-the-middle attackers can't access it easily.https://developer.mozilla.org/en-US/docs/Web/HTTP/...