Visitar URL original
JavaScript30/12 Key Sequence Detection at master · hamster518/JavaScript30 · GitHub
Skip to content

Latest commit

 

History

History
 
 

12 Key Sequence Detection

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.MD

完成目標

做一個打密碼出現彩蛋的功能,像是KONAME code這樣

此例實做的密碼是wesbos,可以自行定義!!

Javascript

pressed.splice(-secretCode.length-1, pressed.length - secretCode.length);

Syntax

array.splice(index, howmany, item1, ....., itemX)

  • index < 0, 從後面數過來
  • howmany, 刪掉的個數