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