Given a set of n objects in no specific order (n = 5 in this example):
{
apple,
orange,
banana,
cherry,
cabbage
}
Use a map (javascript object can act so) with object as the key and integer (set to 0 initially for all objects) as the value.
For each question, you increment the value of the respective chosen key. Since no preference affects none of them, nothing to be done in case it's chosen.
Then iterate the map, finding the key-value pair with highest value. Return the key.