added reverse, toArray and last methods to dllist.js