isString

function isString(val): val is string

Returns true if the specified value is a string.

Parameters

ParameterTypeDescription
valunknownVariable to test.

Returns

val is string

Whether variable is a string.