@Schal330@lemmy.world to Programmer Humor@programming.dev • 7 months agoIt must be a silent Rlemmy.worldimagemessage-square127fedilinkarrow-up1885arrow-down133
arrow-up1852arrow-down1imageIt must be a silent Rlemmy.world@Schal330@lemmy.world to Programmer Humor@programming.dev • 7 months agomessage-square127fedilink
minus-square@cypherix93@lemmy.worldlinkfedilinkEnglish11•7 months ago"strawberry".split('').filter(c => c === 'r').length
minus-square@SpaceNoodle@lemmy.worldlinkfedilink9•7 months agolen([c if c == ‘r’ for c in “strawberry”])
minus-square@Sluyter548@lemmy.worldlinkfedilink2•7 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 ;)