- Abra o devTools do seu navegador
- Só copiar o código do
termooo-solution.js
e jogar na abaconsole
Prontinho, você tem a resposta da palavra do dia no term.ooo
termooo-solution.js
e jogar na aba console
Prontinho, você tem a resposta da palavra do dia no term.ooo
async function getWord() { | |
const words = await ( | |
await fetch( | |
'https://gist.githubusercontent.com/un-versed/6373912fbf4649704b6823ea696cfcb1/raw/629137a0d0c7160b94c35013df8d570b31100174/termooo-wordsv2.json', | |
{ method: 'GET' } | |
) | |
).json() | |
const curDay = () => { | |
var a = new Date().setHours(0, 0, 0, 0) | |
return Math.floor((a - new Date(2022, 0, 2, 0, 0, 0, 0)) / 864e5) | |
} | |
const solution = words[curDay() % words.length] | |
alert(`The answer is: ${solution}`) | |
return solution | |
} | |
await getWord() |
Testem, aqui funcionou.