Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99032

How do I check if users input is equal to a certain value in my array?

$
0
0

Hi I'm currently making a simple version of a chatbot, but I have some issues with my code. I want to check if the user input is equal to a value in my array. What I currently have looks like this:

var digibord = [
    {
        name: ["digibord","smartboard","schoolbord"]
    }
]

function handleMessage(message) {
    if (message.includes(digibord)) {
        Digibord();
    }
}

As you can see I have little experience with javascript so I could use some help...


Viewing all articles
Browse latest Browse all 99032

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>