if variable inside the list, javascript code example Example: typescript check if element in array your_array.includes(the_element)