Again, I wasted some time because I assume same method would work the same way in both Java and JavaScript.
It turns out under some edge case, they don't.
When calling the split method on an empty String, in Java, it returns an empty array while in JavaScript it returns an array with only one element of empty string.
No comments:
Post a Comment