You are given a `string` containing `letters` and the `+` and `=` symbols as an argument.
You need to return `true` if the given `string` is an acceptable sequence, otherwise return `false`.
In this case, an acceptable sequence should return `true` if each `letter` is surrounded by a `+` symbol.
Example:
acceptableSequence('a=+++==b+==c+')
/* returns false
because 'a' is not surrounded by the + symbol on each sides
*/
acceptableSequence('+x+===+y+++z++')
/* returns true
because every letter is surrounded by the + symbol
*/
#javascript #interview #codingchalenge #interviewquestions #acceptablesequence
0 Comments