I have two arrays of strings and want to compare them by value and extract the index numbers of identical items of mainArray that are available in secondArray for example:
var mainArray = ["I", "am", "not", "a", "doctor"]
var secondArray = ["am", "doctor"]
var Result = [1,4]