Converting string “true” / “false” to boolean value [duplicate]

var val = (string === "true");

Leave a Comment