How Can I Properly Url Encode An Array In Javascript

How Can I Properly Url Encode An Array In Javascript