If else array country Javascript | SoloLearn: Learn to code for FREE!


If else array country Javascript

How to get country array in the message Example Var country = ['US','FR',IN'] Var message = 'US,FR' If(message !== country){ Console.log('result message false'') }else{ Console.log('result true') } How to get result accepted with text = 'US,FR'

4/27/2020 4:40:12 PM

Alex Pungki

5 Answers

New Answer


Kindly elaborate your question. It would be better if you share code from playground.


Didn't understand the question ,can you explain what really do you want to output? Fail or ok or US,FR


Maybe you had something like this in mind? https://code.sololearn.com/WmpRXdfS1nMB/?ref=app


How to i condition if else accept with text like = 'US,IN' in array list


Thank josef nemec that worked ..πŸ‘πŸ™πŸ™