@Schal330@lemmy.world to Programmer Humor@programming.dev • 9 months agoIt must be a silent Rlemmy.worldimagemessage-square126fedilinkarrow-up1881
arrow-up1881imageIt must be a silent Rlemmy.world@Schal330@lemmy.world to Programmer Humor@programming.dev • 9 months agomessage-square126fedilink
minus-square@cypherix93@lemmy.worldlinkfedilinkEnglish11•9 months ago"strawberry".split('').filter(c => c === 'r').length
minus-square@SpaceNoodle@lemmy.worldlinkfedilink9•9 months agolen([c if c == ‘r’ for c in “strawberry”])
minus-square@Sluyter548@lemmy.worldlinkfedilink2•9 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
deleted by creator
A zero indexed array doesn’t have a different length ;)
(\r (frequencies “strawberry”))