title: Compare part of string in JavaScript
body: <p>How do I compare a part of a string - for example if I want to compare if string A is part of string B. I would like to find out this: When <code>string A = "abcd"</code> and <code>string B = "abcdef"</code> it needs to return true. How do I do that in JavaScript? If I use <code>substring(start, end)</code> I do not know what values to pass to the <code>start</code> and <code>end</code> parameters. Any ideas?</p>