Array.clear - Prototype JavaScript 框架

Xunxin Prototype API

clear

clear() -> Array

清空所有数组元素

样例

var guys = ['Sam', 'Justin', 'Andrew', 'Dan'];
guys.clear();
// -> []
guys
// -> []