Amer Ramamni

Greenhorn
+ Follow
since Nov 09, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Amer Ramamni

really .....
Anytime the array has a different value other than null, then the return has to be "Rej", otherwise its one of the values in the array.
Please look at my examples.

Hi All,

I need help in java script, I thought I should give this forum a shot.
I have an array that can contains the following examples:

Examples:
array = {"Yes", null, null, "Yes"} - return "Yes"
array = {"Yes", "Yes", "Yes", "Yes"} - return "Yes"
array = {"Yes", "No", "Yes", "Yes"} - return "Rej" because they don't match
array = {"No", "No", null, null} - return "No"
array = {null, null, null, null} - return null
array = {"No", "No", "No", "No"} - return "No"
array = {"Yes", "No", null, null} - return "Rej"

Anytime the array has a different value other than null, then the return has to be "Rej".

I have started working on this, however its not working for all cases. I do need help.

Here is my code:




Thanks in advance.