genzboomer@lemmy.zip to Programmer Humor@programming.dev · 2 个月前Got myself a new mug.lemmy.zipexternal-linkmessage-square31linkfedilinkarrow-up1100arrow-down11
arrow-up199arrow-down1external-linkGot myself a new mug.lemmy.zipgenzboomer@lemmy.zip to Programmer Humor@programming.dev · 2 个月前message-square31linkfedilink
minus-squarepython@lemmy.worldlinkfedilinkarrow-up16·2 个月前Me neither, but I bet it’s still valid JS syntax
minus-squaredohpaz42@lemmy.worldlinkfedilinkEnglisharrow-up9·2 个月前Yes. In JavaScript, Objects without explicit keys will use the value as the key. At least that’s how it works in Chrome devtools output. 🤷♂️
minus-squareZoteTheMighty@lemmy.ziplinkfedilinkarrow-up8·2 个月前This is insane, but ultimately, FAR from the most insane thing JavaScript has done to me this week, so I’ll let it slide.
Me neither, but I bet it’s still valid JS syntax
Yes. In JavaScript, Objects without explicit keys will use the value as the key. At least that’s how it works in Chrome devtools output. 🤷♂️
This is insane, but ultimately, FAR from the most insane thing JavaScript has done to me this week, so I’ll let it slide.