// Check if two strings are isomorphic

function isIsomorphic(stringOne, stringTwo) {
	
	// check if strings are of the same length (if not, cannot be isomorphic)
	if (stringOne.length !== stringTwo.length) {
		return false;
	}

	var letterMap = {};

	for (i = 0; i < stringOne.length; i++) {
		var letterA = stringOne[i],
			letterB = stringTwo[i];

		// if the letter does not exist, create a map and map it to the value of the second letter
		if (letterMap[letterA] === undefined) {
			letterMap[letterA] = letterB;
		} else if (letterMap[letterA] !== letterB) { // if letterA already exists in the map, but does not map to letterB, that means that A is mapping to more than one letter
			return false;
		}
	}

	// if after iterating through and conditions are satisfied, return true
	return true;
}















@@ -797,21 +797,186 @@
 rue;%0A%7D%0A%0A
-%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A
+// test cases%0AisIsomorphic(%22see%22, %22add%22); // expect to return true%0AisIsomorphic(%22pick%22, %22note%22); // expect to return true%0AisIsomorphic(%22test%22, %22pick%22); // expect to return false
 %0A

Add test cases