var p = "Sarah Connor"; p.indexOf("John") >= 0 ? alert("John found!") : alert ("No John");
var word = /John/, p = "Sarah Connor"; word.test(p) ? alert ("John found!") : alert ("No John");