dope vector data structure in Javascript programming language