EcmaScript 6 and the Stack class