Javascript solution - Easy understanding
\nvar minimumMoves = function(s) {\n    let move = 0;\n    let i = 0;\n    while(i<s.length){\n        let char = s[i];\n\t\t// incrementing the index if we alr
```\nvar minimumMoves = function(s) {\n    let move = 0;\n    let i = 0;\n    while(i<s.length){\n        let char = s[i];\n\t\t// incrementing the index if we already have \'O\'\n        if(char== \'O\'){\n            i++;\n        }\n\t\t// incrementing the move and index by 3 (Per move =  3 characters)\n        if(char== \'X\'){\n            i=i+3;\n            move++;\n        }\n    }\n    return move;\n};\n```
['Greedy', 'JavaScript']