@IsNull (JavaScript)

Indicates if a value is an empty string or list of empty strings.

Defined in

@Functions (JavaScript)

Syntax

@IsNull(value:any) : int
Parameter Description
value Value to be checked.
Return value Description
int 1 if the value is an empty string or a list of empty strings, 0 otherwise.

Usage

This function checks for an empty string. Do not confuse it with the null value.

Examples

This example includes @Null in a list and checks for it with @IsNull.
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var cities = new Array("Paris", "Berlin", @Null(), "Moscow", "London");

for(var i = 0; i < cities.length; i++) {
	if(!@IsNull(cities[i])) p(cities[i]);
}

This example includes an empty string in a list and checks for it with @IsNull.

function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var cities = new Array("Paris", "Berlin", "", "Moscow", "London");

for(var i = 0; i < cities.length; i++) {
	if(!@IsNull(cities[i])) p(cities[i]);
}

This example includes @Null in a list and checks for it by comparing to an empty string.

function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var cities = new Array("Paris", "Berlin", @Null(), "Moscow", "London");

for(var i = 0; i < cities.length; i++) {
	if(cities[i] != "") p(cities[i]);
}

This example includes null in a list and checks for it by comparing to null.

function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var cities = new Array("Paris", "Berlin", null, "Moscow", "London");

for(var i = 0; i < cities.length; i++) {
	if(cities[i] != null) p(cities[i]);
}