I am looking for a function written in javascript ( not in jquery) which will return true if the given word exactly matches ( should not be case sensitive).
like..>
Try this:
var s = 'string to check', ss= 'to'; if(s.indexOf(ss) != -1){ //output : true }