Why is this function behaving differently than I expected?
Recently, I wrote a javascript code by referring to the Python code, but the result did not come out as expected. Here’s the code. const languages = [‘python’, ‘perl’, ‘c’, ‘java’]; for (let lang of languages) { if(lang == "python" || "perl") { console.log(`${lang} need interpreter`); } else if (lang == "c" || "java") {… Read More Why is this function behaving differently than I expected?