JavaScript Brute Force Code
\n\n\n```\n/*\n * @param {string} s\n * @param {string} t\n * @return {number}\n /\nvar countSubstrings = function(s, t) {\n    \n    let ans = 0;\n    \n    fo
\n\n\n```\n/**\n * @param {string} s\n * @param {string} t\n * @return {number}\n */\nvar countSubstrings = function(s, t) {\n    \n    let ans = 0;\n    \n    for(let i=0; i < s.length; i++){\n        for(let j=0; j < t.length; j++){\n            \n            let x = i;\n            let y = j;\n            let d = 0\n            while(x < s.length && y < t.length){\n                if(s[x] != t[y])d++;\n                if(d ==1)ans++;\n                if(d ==2)break\n                x++;\n                y++\n            \n            }\n               \n            \n        }\n    }\n    \n    return ans\n};
[]