[JavaScript] Fast and simple for loop solution
\nfunction areAlmostEqual(target, source) {\n    if(target === source) {\n        return true;\n    }\n\n    let mismatches = [];\n\n    for (let i = 0; i < sou
```\nfunction areAlmostEqual(target, source) {\n    if(target === source) {\n        return true;\n    }\n\n    let mismatches = [];\n\n    for (let i = 0; i < source.length; i++) {\n        if(source[i] !== target[i]) {\n            mismatches.push(i);\n        }\n    }\n\n    if(mismatches.length !== 0 && mismatches.length !== 2) {\n        return false;\n    }\n\n    return target[mismatches[0]] === source[mismatches[1]] && target[mismatches[1]] === source[mismatches[0]];\n}\n```
['Iterator', 'JavaScript']