ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  VBScript or Perl?
Subject:   More considerations
Date:   2004-01-06 08:14:11
From:   brianiac
Response to: More considerations

Extracting keys from a JScript array is ugly, but not impossible:
var hash= { 'one': 'first', ... }, keys= {};
for(key in hash) keys.push();
keys= keys.sort();


Slicing is also supported, though only for contiguous regions:
var slice234= arr.slice(2,4);