co [ i ] is going to store counts of consonants from str [ len - 1 ] to str [ i ] . vo [ i ] is going to store counts of vowels from str [ len - 1 ] to str [ i ] .
var co = new Array ( len + 1 ) . fill ( 0 ) ; var vo = new Array ( len + 1 ) . fill ( 0 ) ;