• TAPgiles@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 months ago

    Ah yes, I’ve seen perchance is everywhere… which is cool sometimes, unless you don’t want it to be perchancing and then it’s a bloomin’ nightmare. 🤣 And if you know JS as I do, and come in here thinking you can do easy things… you’re probably going to bash your head against a brick wall from time to time until you can hack your way around it!

    I could see why [({})] returns the same value as [x={}]. Shouldn’t [[{}]] return an array though? Or do you just mean in terms of it perchancing it so it gives you one of the array items at random and there’s only one array item so it (eventually evaluates to) the same thing?