Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
I'm not sure what your question is, but if you're wondering about the variable
index
:string.find(value)
returns the index ofvalue
in the given string.If you're wondering about the
[:index]
: that is slicing.In that example, it returns the
url
string from the beginning up until the previously defined variableindex
.In slicing, you have 3 parameters, separated by colons: [start:stop:(step)].
stop
is not inclusive.step
can be omitted, as it defaults to1
.This comment is hidden because it contains spoiler information about the solution
what is index?
[:index] and index ??
noob here. Why do we add +1 to a?