[codewars]Check if two words are isomorphic to each other

Check if two words are isomorphic to each other

不需要管誰對誰,只需要確認相同的字母,有對到一樣的結果

展開運算子(Spread Operator)

var f = (a)=>{
	return [...a].map((e)=>{
		return a.indexOf(e)
	}).join`,`
	
}

const isomorph = (a, b) => f(a) == f(b);