Skip to content

Array.prototype.isEmpty()

Marcel Kloubert edited this page Feb 4, 2015 · 1 revision

Array.prototype.isEmpty() method

Checks if that array is empty or not.

Syntax

Array.prototype.isEmpty();

Result

Is empty or not.

Examples

var a1 = [];
var a2 = [5979, 'TM'];

var res1 = a1.isEmpty();    // (true)
var res2 = a2.isEmpty();    // (false)
Clone this wiki locally