Constraint Validation DOM Methods There are two methods : 1. checkValidity() 2. setCustomValidity() OUTPUT : Enter a number and click OK: OK If the number is less than 200 or greater than 400, an error message will be displayed.
Addition means adding numbers, while Concatenation means adding strings. But the same thing is both operation use + oprator. OUTPUT : Adding number + string.
Data type does not metter in regular expression. The “if” statement will return “true”. OUTPUT :
Use Of Assignment Operator If a programmer coincidentally uses an assignment operator (=), instead of a comparison operator (==) in an if statement, it will generate errors or unexpected results. OUTPUT :