根据字符串的第一次出现是从字符串数组中获取字符串的索引

我有一个数组和字符串

const arr = ['home', 'about', 'contact']
const value = 'desktop_about'
const priority = ?

优先级应为1,因为那是部分或全部包含在其自身中的第一个字符串的索引。

什么是计算此值的最佳方法,我想到了不同的循环,但似乎都过于复杂了