Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[tt]split('/')[/tt] - the [tt]split()[/tt] method splits the string in pieces separated by the given string or regular expression and returns the result as an array.captedgar said:what does ('/')[0] means in split('/')[0]?
[blue]>>> arrTest=['foo/bar/baz','something/else','some/more'][/blue]
[b][[/b] [red]"foo/bar/baz"[/red], [red]"something/else"[/red], [red]"some/more"[/red] [b]][/b]
[blue]>>> arrTest[0][/blue]
[red]"foo/bar/baz"[/red]
[blue]>>> arrTest[0].split('/')[/blue]
[b][[/b] [red]"foo"[/red], [red]"bar"[/red], [red]"baz"[/red] [b]][/b]
[blue]>>> arrTest[0].split('/')[0][/blue]
[red]"foo"[/red]