Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 413 Bytes

7 kyu Exes and Ohs.md

File metadata and controls

15 lines (11 loc) · 413 Bytes

Exes and Ohs (7 kyu)

https://www.codewars.com/kata/exes-and-ohs/

Check to see if a string has the same amount of 'x's and 'o's. The method must return a boolean and be case insensitive. The string can contain any char.

Examples input/output:

XO("ooxx") => true
XO("xooxx") => false
XO("ooxXm") => true
XO("zpzpzpp") => true // when no 'x' and 'o' is present should return true
XO("zzoo") => false