Javascript examples for Statement:if
Comparing string to int inside if statement
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from ww w .j a v a 2 s.c om*/ var myString = "3T-4T"; var notValidate = myString.substring(3, 4); if(notValidate == 4) { console.log("Value1"); } else { console.log("null"); } } </script> </head> <body> </body> </html>