The use of the colon is the main thing that I do not understand here. When I look up Python colon, I get no answer. Does it work like an equal sign here? dose it end a line of code? Dose it just separate the two parts of Code? I do not know JavaScript.
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
The previous poster was trying to explain the colon to you without using a colon since it was confusing you I guess.
The colon is part of python’s slice index notation.
Here’s an article that explains how to use it (in short the number on the left of the colon is where the slicing begins and the number on the right is where it ends)