Re: When does != == !=?

by "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>

 Date:  Sun, 2 Jul 2000 11:41:53 +0530
 To:  "Jason Brett" <jbbrett(at)zigzagnet.com>,
"Hwg-Languages@Hwg. Org" <hwg-languages(at)hwg.org>
 References:  zigzagnet
  todo: View Thread, Original
When the user selects an operator from a select, he is selecting a string
"==" and not a literal operator as ==, so comparison is very easy.

if ("==" == "!="){
// do something.......

}

If this was not what you were trying to achieve, please elucidate.

-Srini

----- Original Message -----
From: Jason Brett <jbbrett(at)zigzagnet.com>
To: Hwg-Languages@Hwg. Org <hwg-languages(at)hwg.org>
Sent: Sunday, July 02, 2000 8:53 AM
Subject: When does != == !=?


| Hey folks,
|
| I'm trying to do a comparison between two operators in javascript. Is that
| possible?
|
| I have a dropdown list where the user selects an operator to use. Later I
| need to compare the user's selection to determine my action.
|
| Is this possible? If not, what's a workaround?
|
| Example:
|
| User choices:
| ==
| !=
| >
| <
| <=
| >=
|
| My statement says (variables translated here) if ( == == == ) { ...
| but that particular case returns false.
|
| What do I do?
|
| Thanks in advance!
|
| Jason Brett
| ZigZag Internet Solutions
| Powerful Solutions. Explosive Results.
|
|

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA