How to find values from array with vanilla javascript?


How to find values from array with vanilla javascript?

I have multidimensional array like this:

[[1,2,"+"],["3",3,"*"],["9",4,"/"]] 

Now I need to find if the values from my input form exist in this array. I get values from the input as array like

[1, 2, "+"] 

How can I check if those values exist in the upper array? In this case it would match on the first array. No external libraries allowed. Or maybe jquery, but nothing else as my teacher doesn't allow using libraries.

Submitted February 19, 2017 at 09:56PM by shnigi
via reddit http://ift.tt/2lz0KyR

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s