Dirac Bracket Notation In Javascript Regular