This code runs as I expect:
let vw, vh
[vw, vh] = [document.body.clientWidth, document.body.clientHeight]
console.log(vw)
But this code doesn't. Just the unused assignment seems to change the behavior.
let vw, vh
const thebody = document.body // what did I do wrong besides waste an assignment??
[vw, vh] = [document.body.clientWidth, document.body.clientHeight]
console.log(vw)
Weirder still, logging the body logs it, but causes an error on the next assignment...
let vw, vh
const thebody = document.body
console.log(thebody) // what did I do EXTRA wrong besides log something??
[vw, vh] = [document.body.clientWidth, document.body.clientHeight]
console.log(vw)