Easy to understand JavaScript solution
\tvar minimumMoves = function(s) {\n\t\tlet moveIndex = moves = 0;\n\n\t\twhile (moveIndex < s.length) {\n\t\t\tconst findIndex = s.indexOf(\'X\', moveIndex);\n
\tvar minimumMoves = function(s) {\n\t\tlet moveIndex = moves = 0;\n\n\t\twhile (moveIndex < s.length) {\n\t\t\tconst findIndex = s.indexOf(\'X\', moveIndex);\n\n\t\t\tif (findIndex > -1) {\n\t\t\t\tmoveIndex = findIndex + 3;\n\t\t\t\tmoves += 1;\n\t\t\t}\n\t\t\telse moveIndex = s.length;\n\t\t}\n\n\t\treturn moves;\n\t};
['JavaScript']