|
| 15 Sep 2013 05:00 AM |
I have this:
var compare=function(choice1, choice2){ if (choice1===choice2){ console.log("The result is a tie!"); } };
it works. but the thing I'm following says "Inside the function, write an if statement such that if the two parameters equal each other, the function will return "The result is a tie!"" |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Sep 2013 05:04 AM |
| Sadly, I don't know about java. So...cntkillme? |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Sep 2013 05:05 AM |
| That doesn't look like Java... Is that JavaScript? |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 05:05 AM |
| Yes, javascript, I meant to say javaScript, not java. |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 05:07 AM |
| Comparison is === in JavaScript..? |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 05:08 AM |
= sets, === verifies, yea.
any ideas/help about the return? |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Sep 2013 05:09 AM |
| A quick read says that == compares, regardless of type and === needs an exact match... Thats quite nice. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 15 Sep 2013 05:13 AM |
| well, as I have it now, it works as I want, but the instructions I'm following it wants a return and won't let me follow on, until it has a return and is working.... :/ |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 05:13 AM |
return "The result is a lie";
? |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 05:18 AM |
| eh, I'll skip it for now.. |
|
|
| Report Abuse |
|
|