JavaScript code not working with "toLowerCase" on equating it with value received from prompt : <pre><code>let browser = prompt('Enter browser name','Enter here..');
if (browser.toLowerCase=='edge') {
    alert('You got the Edge!');
} 
else if (browser.toLowerCase=='chrome' || browser.toLowerCase=='firefox' || browser.toLowerCase=='safari' || browser.toLowerCase=='opera') {
    alert('Okay we support these browsers too!')
} 
else {
    alert('We hope this page looks okay!');
}
</code></pre>

<p>The above code is only executing the "Else" condition (last one).
Removing "toLowerCase" makes it work perfectly, but why don't it works with "toLowerCase"?? </p>
