htmlprefix

PHOTO EMBED

Fri Dec 25 2020 09:50:26 GMT+0000 (UTC)

Saved by @luqmanmiraj42@gmail.com #stringprefix

function prefixStrings(a,b){
     bol = true
     options = []    
     s = ""
    for (let i=0;i<a.length;i++){
          let x= a[i]
          s= s+x
          options.push(s)
    
    }  
    for (let j=0;j<b.length;j++) {
            let y= b[j]
            prefixfound = false
            for (let i=0;i<options.length;i++) {
                let x= options[i]
                console.log(y.indexOf(x))
                if(y.indexOf(x) == 0){
                    prefixfound = true
                    break                
                 }
                  
            }
        
        if(!prefixfound) return false
    }

return bol

}
content_copyCOPY

https://mail.google.com/mail/u/0/