Right but is it every OldMan
?
Right but is it every OldMan
?
This is what I imagine the Reddit developers think of themselves as. 😆
I thought IIFE’s usually looked like (function (...params) {})(...args)
. That’s not the latest way? To be honest I never used them much, at least not after arrow functions arrived.
People are down voting you when you are just expressing a feeling. I don’t think that’s right, but I hope you stay for the other great content on Lemmy and only go to Reddit for the missing stuff.
lol, you’d really have to go out of your way in this scenario. First implement a way to get every single permutation of a list, then to ahead with the asinine solution. 😆 But yes, nice one! Your imagination is impressive.
So there’s yet another level of quirkery to this bullshit then, it seems. 😆 Nice digging! 🤝
I also noticed that if you surround the curlies with parentheses, you get the same again:
> eval('{} + []')
0
> eval('({}) + []')
'[object Object]'
I guess, yeah, that’ll do it. Although that’d probably be yet one or a few extra factors involving n.
In node, I get the same result in both cases. "[object Object]"
It’s calling the toString()
method on both of them, which in the array case is the same as calling .join(",")
on the array. For an empty array, that results in an empty string added to "[object Object]"
at either end in the respective case in the picture.
Not sure how we’d get 0 though. Anybody know an implementation that does that? Browsers do that maybe? Which way is spec compliant? Number([])
is 0, and I think maybe it’s in the spec that the algorithm for type coercion includes an initial attempt to convert to Number before falling back to toString()
? I dunno, this is all off the top of my head.
My mental model of it is a chain, yes. But you can define it however you like. It’s just steps in some direction.
Maybe a cake would suit someone the best.
Exactly. For every level of abstraction, the abstractor is the high level and the abstractee is the lower level. Those aren’t real words perhaps, but you get what I’m saying. It’s all relative along the chain of abstraction.
How in the hell does anyone f— up so bad they get O(n!²)? 🤯 That’s an insanely quickly-growing graph.
Curious what the purpose of that algorithm would have been. 😅
Quick question, how do you back up a 2FA “code” to Bitwarden? Sounds like a wise thing to do for my current 2FA accounts.
Yeah… Then again I just use the DuckDuckGo bang !mdn
and it searches MDN directly.
There’s also devdocs.io which can be indispensable when using a lot of popular utility libraries and frameworks in the same project. Just having a single page with all the relevant docs is just a real blessing.
I remember visiting W3S like 10-15 years ago when first learning DOM manipulation etc at uni. But nowadays there’s nothing it can give me that MDN can’t, that I need to know.
Learn JavaScript. It’s a pretty good language. 👍
MDN ftw, screw stackoverflow.
Thoroughly confusing lol. I think I need to check the spec in order to grasp this. I feel like this has more to do with the typing system rather than nil
itself, maybe. I’ll see.
But yeah, this is nothing like null
or undefined
in JS, but more similar to NaN
.
Thank you for trying to explain!
What I mean is that in JS you can’t do NaN != NaN
, not even variable != NaN
. So you’re not saying it’s the same in Go, since you can do a != nil
?
👏🤝