RUVIDEO
Поделитесь видео 🙏

33. Searching through an array with for loop | Learn Javascript in Nepali [2022]

Complete Javascript Tutorial in Nepali | This video is about ways to use arrays in javascript.
In this video, I talk about using iteration using for loops to search in an array of any data type.
I am using an array of foods and trying to search if there's pizza in it. To do so, I am creating a variable found (initialized with the value of 'pizza') that I compare with the array element obtained from the iteration (using for loop).
The process seems to be wordy and tricky here but it's super easy when you actually try it. You may be thinking about why I am going over array methods in detail and what use you may have.
To be honest, what you are learning is super important not just because every programmer says that you need a solid grasp of fundamentals but because you are going to want to solve problems someday. Stuff like chat apps, browser games, engines, backends for websites, and so on, and you may not realize now but things like these involve using data.
Even something like a simple portfolio website may want to track the number of viewers, or returning viewers and for how long they were on your site.
If that seems too far-fetched, you can simply think about this: the Search button. Most websites have this, right?
So, you need to have one too. Let's say you don't want to make that one by yourself, so you get somebody else's code from Github. That is perfectly okay, and something I would do as well.
Next, let's say I want to know what the viewers on my site are searching for. And if somebody has searched for an item say n times, I want it to say 'searched n times'. If you don't understand how iteration works, you can still do that, but it would involve asking on StackOverflow or coding forums, and they would solve that for you.
And since you have little idea what the code does, you won't be able to optimize it yourself.
It may be too soon, but I would like to go on about micro-optimizations and using algorithms in a way that uses resources most efficiently.
The next video is going to be about searching through strings.
Happy learning!

Shortcuts:
Code snippet/ auto-completion: Emmett Extension (VS-Code)
Cut: Ctrl-X
Copy: Ctrl-C
Select multiple lines: Hold Ctrl+Shift and use arrows
Paste: Ctrl-V
Console/Developer Mode (Google Chrome): Ctrl-Shift-J
Format selection of code: Shift-Alt-F
Adjust zoom level of IDE: Enable Ctrl+Mouse to control zoom level from

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «33. Searching through an array with for loop | Learn Javascript in Nepali [2022]», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.