qikp commited on
Commit
34536d0
·
verified ·
1 Parent(s): 528a062

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +1 -1
script.js CHANGED
@@ -4,7 +4,7 @@ v=Object.entries(i).sort((e,f)=>f[0].length-e[0].length).map(e=>[e[0].replace("
4
  s=q("input").value
5
  t=[]
6
  while(s){w=v.find(u=>s.startsWith(u[0]))
7
- if(w){s.splice(w[0].length)
8
  t.push(w[1])}
9
  else{t.push(-1)
10
  break}}
 
4
  s=q("input").value
5
  t=[]
6
  while(s){w=v.find(u=>s.startsWith(u[0]))
7
+ if(w){s=s.slice(w[0].length)
8
  t.push(w[1])}
9
  else{t.push(-1)
10
  break}}