0

I was wondering if it's possible to add multiple conditions to .includes() in javascript. For example:

var item_name = "leather jacket"
var item_color = "pink"

.includes(item_name && item_color)

So, it has to include both the item_name and the item_color.

Thanks in advance and stay healthy these days!

  • Just use two `includes` or use a `regex.test` – Hagai Wild Apr 12 '20 at 17:29
  • 1
    @Jokke2000 Welcome to StackOverflow. This question might be the possible duplication of this https://stackoverflow.com/questions/37896484/multiple-conditions-for-javascript-includes-method – Afrida Anzum Apr 12 '20 at 17:32

0 Answers0