Computer Science, asked by esaahmed5373, 1 year ago

How can I convert a string to boolean in JavaScript?

Answers

Answered by Anonymous
1

If the string value is 'true', then the booleanvalue will also have a true, else a false. Detail : Here we use the parse method of JSON . JSON is a built-in object of javascript and its parse method parses a string as JSON and converts it into an object corresponding to the given text

Similar questions