nzediegwu1 / XoXo

A function that checks if a string has the same amount of 'x's and 'o's. The method should return a boolean and be case insensitive. The string can contain any char.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XoXo

A function that checks if a string has the same amount of 'x's and 'o's. The method should return a boolean and be case insensitive. The string can contain any char.

Examples input/output:

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

About

A function that checks if a string has the same amount of 'x's and 'o's. The method should return a boolean and be case insensitive. The string can contain any char.


Languages

Language:JavaScript 100.0%