Functions_Wacky7

I created an "if"conditon and placed the array and its function in it.
However, the code runs even if the condition is false. Trying to figure
out why:

var userOption = prompt("If you want to sort your array from the longer
to the shorter words, enter 'longer'. If you want to sort the array
from the shorter to longer words, enter 'shorter'");

if(userOption=="longer" || "LONGER") {

    myArray.sort(function (a,b){
        return b.length- a.length
    });
}

console.log(myArray);