String.prototype.splitbeginner'a,b,c'.split(',') // β ['a', 'b', 'c']
'hello'.split('') // β ['h', 'e', 'l', 'l', 'o']
'hi'.split() // β ['hi']Use split() to divide a string into an array of substrings at each occurrence of the separator.
The separator can be a multi-character string.
Challenge: Implement splitBySep(str, sep) that splits str by the separator sep.
splitBySep('one::two::three', '::') // β ['one', 'two', 'three']