Schal330@lemmy.world to Programmer Humor@programming.dev · 4 months agoIt must be a silent Rlemmy.worldimagemessage-square127fedilinkarrow-up1884arrow-down133
arrow-up1851arrow-down1imageIt must be a silent Rlemmy.worldSchal330@lemmy.world to Programmer Humor@programming.dev · 4 months agomessage-square127fedilink
minus-squarecypherix93@lemmy.worldlinkfedilinkEnglisharrow-up11·4 months ago"strawberry".split('').filter(c => c === 'r').length
minus-squareAwkwardLookMonkeyPuppet@lemmy.worldlinkfedilinkEnglisharrow-up1arrow-down2·4 months agodeleted by creator
minus-squareSluyter548@lemmy.worldlinkfedilinkarrow-up2·4 months agoA zero indexed array doesn’t have a different length ;)
minus-squareanti-idpol action@programming.devlinkfedilinkarrow-up2·4 months ago(\r (frequencies “strawberry”))
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkarrow-up9·4 months agolen([c if c == ‘r’ for c in “strawberry”])
minus-squareTiefling IRL@lemmy.blahaj.zonelinkfedilinkarrow-up6·4 months ago'strawberry'.match(/r/ig).length
"strawberry".split('').filter(c => c === 'r').length
deleted by creator
A zero indexed array doesn’t have a different length ;)
(\r (frequencies “strawberry”))
len([c if c == ‘r’ for c in “strawberry”])
deleted by creator
'strawberry'.match(/r/ig).length