i just looked through the modenizer code and came across the following function:
function contains(str, substr) {
return !!~('' + str).indexOf(substr);
}
modenizer has such a small function for small tests. Now, turning to my question, I understand that double equal is the conversion of everything to a logical value, but what is it !!~for what it is
''
up to strfor?
I saw several SO questions that address similar problems, but not exactly this problem, can someone explain what is happening inside this function in the context of this example.
source
share