You Can Treat Strings Like Arrays
Вставка
- Опубліковано 9 лют 2025
- This video shows how you can work with Strings and Arrays in many of the same ways. They share quite a few methods with the same names that work in the same way.
Code Sample: gist.github.co...
just discover your channel , amazing! keep up !!!
Another very cool tutorial!
Clear and to the point, as always thank you very much.
Basically you are using a string as a array of chars, which is nothing new. It has some limitations dealing with Unicode chars like emojis. For example a "💔" takes 2 slots. So "I💔U".length is 4 instead of only having 3 chars. It can mess us manual search (if you want to search every 2 chars or something)
Also using the Split method on string returns an Array object, not a string primitive.
Idk. This is not a serious issue. It's more like a bad practice (but works for limited functions)
Never said it was something new. Some of my videos are for novice JS students who have never programmed before. I talk about the unicode char issue in this video . - ua-cam.com/video/Kr7grjJXm6U/v-deo.html
I was using the split method as one way of creating an Array so I had one to work with, just illustrating that you could think about them as both as a sequence of elements.
can you please do some real world projects using vanilla javascript.
thank you
Eventually I will. It just takes a lot of time to plan and create courses like that.