Check String Length

STRING

Problem

Given a string s, return true if its length is a multiple of 3, and false otherwise.

Examples

isLengthMultipleOfThree("hello") // false // The length of the string "hello" is 5, which is not a multiple of 3. isLengthMultipleOfThree("abc") // true isLengthMultipleOfThree("abcdef") // true isLengthMultipleOfThree("ab") // false
Loading...