JavaScript - What Does != Symbol Mean?
Question in title.
Reply With Quote 01-20-2015, 07:12 PM #2 jmrker View Profile View Forum Posts Senior Coder Join Date Aug 2006 Location FL Posts 3,175 Thanks 39 Thanked 510 Times in 504 Posts In the logic system, == means equal. ! means logical not. So != means not logically equal or not equal Example: x = 5 y = 6 x == y would be false but x != y would be true Reply With Quote 01-20-2015, 07:31 PM #3 felgall View Profile View Forum Posts Visit Homepage Master Coder Join Date Sep 2005 Location Sydney, Australia Posts 6,745 Thanks 0 Thanked 666 Times in 655 Posts == and != test value but not type and so can give unexpected results and so it is recommended that they be avoided. Code that uses them s generally poorer than code that uses === and !== which test for exact equality and non-equality (both value and type). For example: 5 == '5' 5 !== '5' Similar TutorialsHi, my javascript does not working after I retrieve a record that contains square symbol in the database. The square symbol should be a newline in a textarea. This is how the record "looks" in the table: Actually, I am inserting the record using ASP and the value with square symbol is the value from a textarea with newline/enter. After that I retrieve the value using ASP and pass it to javascript and then the page is not working. If I retrieve other record which contain no square symbol then the script is working. Please help on this, appreciates! hello .. I want know what is the mean of these symbol : || {} thanks .. I'm making a calculator with javascript inside of my html, but I can't figure out the right way to produce a working ^ sign. I've searched online for 4 hours now. Does anyone happen to know what I should type? Here's my code Code: <form name="Calc" style="position: fixed; top: 25px; right: 5px; background: #5F4A29;" action=""> <table border="6"> <tr> <td colspan="4"><input type="text" name="Input" size="25" /></td> </tr> <tr> <td><input class="button" type="button" value=" c " onclick="Calc.Input.value = ''" /></td> <td></td> <td></td> <td><input class="button" type="button" value=" = " onclick="Calc.Input.value = eval(Calc.Input.value)" /></td> <tr> </tr> <td></td> <td><input class="button" type="button" value=" ( " onclick="Calc.Input.value += '('" /></td> <td><input class="button" type="button" value=" ) " onclick="Calc.Input.value += ')'" /></td> <td><input class="button" type="button" value=" ^ " onclick="Calc.Input.value += '^(x,y)'" /></td> </tr> <tr> <td><input class="button" type="button" value=" 1 " onclick="Calc.Input.value += '1'" /></td> <td><input class="button" type="button" value=" 2 " onclick="Calc.Input.value += '2'" /></td> <td><input class="button" type="button" value=" 3 " onclick="Calc.Input.value += '3'" /></td> <td><input class="button" type="button" value=" + " onclick="Calc.Input.value += '+'" /></td> </tr> <tr> <td><input class="button" type="button" value=" 4 " onclick="Calc.Input.value += '4'" /></td> <td><input class="button" type="button" value=" 5 " onclick="Calc.Input.value += '5'" /></td> <td><input class="button" type="button" value=" 6 " onclick="Calc.Input.value += '6'" /></td> <td><input class="button" type="button" value=" - " onclick="Calc.Input.value += '-'" /></td> </tr> <tr> <td><input class="button" type="button" value=" 7 " onclick="Calc.Input.value += '7'" /></td> <td><input class="button" type="button" value=" 8 " onclick="Calc.Input.value += '8'" /></td> <td><input class="button" type="button" value=" 9 " onclick="Calc.Input.value += '9'" /></td> <td><input class="button" type="button" value=" * " onclick="Calc.Input.value += '*'" /></td> </tr> <tr> <td></td> <td><input class="button" type="button" value=" 0 " onclick="Calc.Input.value += '0'" /></td> <td><input class="button" type="button" value=" . " onclick="Calc.Input.value += '.'" /></td> <td><input class="button" type="button" value=" / " onclick="Calc.Input.value += '/'" /></td> </tr> </table> </form> |