I was wondering, say I had some thing like the following:
console.log(element.find('div').eq(3).text().indexOf('whatever'));
bearing in mind that element
is defined and the console is logging a value of 32 (or anything that isn't -1) what would be the best way of converting the result into a Boolean so my console.log
either outputs true
or false
Thanks in advance.
element.find('div').eq(3).text().indexOf('whatever') > -1
!!~something.indexOf('whatever')