You are here

toBoolean

toBoolean(string) returns a Boolean object from a string value.

Parameters

booleanString
A boolean string, true or false.

Returns

Boolean value

Example

  var booleanString = "true";

  model.result = utils.toBoolean(booleanString);        
      

The preceding code snippet would return a boolean value for result of true.