In this article, you will learn how to get javascript function return boolean
The Boolean. valueOf() is an inbuilt function in javascript which is used to return a boolean value either true or false depending upon the value of the specified boolean object. It returns false if the string argument is null otherwise it returns true.
function validatePassword()
{
var password = document.getElementById("password");
var password_confirm1 = document.getElementById("password_confirm");
return password.value !== "" && password.value === password_confirm1.value;
}
The Boolean. valueOf() is an inbuilt function in javascript which is used to return a boolean value either true or false depending upon the value of the specified boolean object. It returns false if the string argument is null otherwise it returns true.
minify code