@Schal330@lemmy.world to Programmer Humor@programming.dev • 10 months agoIt must be a silent Rlemmy.worldimagemessage-square126fedilinkarrow-up1885arrow-down133
arrow-up1852arrow-down1imageIt must be a silent Rlemmy.world@Schal330@lemmy.world to Programmer Humor@programming.dev • 10 months agomessage-square126fedilink
minus-square@cypherix93@lemmy.worldlinkfedilinkEnglish11•10 months ago"strawberry".split('').filter(c => c === 'r').length
minus-square@SpaceNoodle@lemmy.worldlinkfedilink9•10 months agolen([c if c == ‘r’ for c in “strawberry”])
minus-square@Sluyter548@lemmy.worldlinkfedilink2•10 months agoA zero indexed array doesn’t have a different length ;)
"strawberry".split('').filter(c => c === 'r').length
len([c if c == ‘r’ for c in “strawberry”])
deleted by creator
'strawberry'.match(/r/ig).length
(\r (frequencies “strawberry”))
deleted by creator
A zero indexed array doesn’t have a different length ;)