My goal is display alert message if varible test is the same as the one item of the array active.
<p id="user">Steve Jobs</p>
var test = $("#user").text();
var active = [
"Steve Jobs",
"Steve Wozniak",
"Tim Cook"
]
if ( test === active ) {
alert ("match");
}
How can I make it? Why my script doesn't work?