javascript - What does .equals() do? -


i saw use of .equals() method in stackoverflow posting:

any way make jquery.inarray() case insensitive?

var matchstring = "matchme"; var rslt = null; $.each(['foo', 'bar', 'matchme'], function(index, value) {    if (rslt == null && value.tolowercase().equals(matchstring.tolowercase())) {     rslt = index;     return false;   } }); 

yet cannot find documentation on method. references help.

the code you've seen in other answer not standard js code.

it must have been lifted page includes other code adds .equals() method string class (e.g. "processing.js" library) code such as:

string.prototype.equals = function(that) {     return === that; } 

i've corrected original answer no longer has dependency.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -