var a = [1,2,3,4] var b = [3,2,4,1] var avatar = "http://thirdwx.qlogo.cn/mmopen/vj4mlx8ZzpFXbBMbTgS6FSU4ia8R9H1msUCxmwK2EkNQawVayXbBcTXCibUpXRwicmVb5wUeLOhd5fJCIhweAAKbXZWGkabB2Ax/132" var index = avatar.endsWith('/132') console.log(index)