AIMMOTH
2014-10-07
Java and JavaScript String split
There's a big difference between Java and JavaScript version of String's split method/function.
Java
"/".split("/") => []
"".split("/") => [""]
"/something".split("/") => ["", "something"]
JavaScript
"/".split("/") => ["", ""]
"".split("/") => [""]
"/something".split("/") => ["", "something"]
Inga kommentarer:
Skicka en kommentar
Senaste inlägg
Äldre inlägg
Startsida
Prenumerera på:
Kommentarer till inlägget (Atom)
Inga kommentarer:
Skicka en kommentar