var isIsomorphic = function(s, t) {
const sMap = new Map();
const tMap = new Map();
let sCount = 0, tCount = 0;
for(let i = 0; i < s.length; i++){
const charS = s.charAt(i);
const charT = t.charAt(i);
if(!sMap.has(charS)){
sMap.set(charS,sCount);
sCount++;
}
if(!tMap.has(charT)){
tMap.set(charT,tCount);
tCount++;
}
if(sMap.get(charS) !== tMap.get(charT)) return false;
}
return true;
};