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

102 Labels example - JavaScript Tutorial 2018

The Full #Javascript #tutorial for #beginners [#JS]: http://bizanosa.com/js

Learn HTML, CSS and JavaScript

http://bizanosa.com/sp/learn-html-css-javascript/


102 Labels example 2 again - JavaScript for Beginners.

This is a Javascript tutorial from scratch for any beginner. Use the above link to watch the full JS video tutorial..

Next Video: https://youtu.be/NOZxm_5dgdk
Previous Video: https://youtu.be/QT6ZmFlcbLo


Javascript,web design, js,js tutorial,javascript tutorial, js guide,javascript guide,front end web design,frontend javascript,

javascript video tutorials, JavaScript for Beginners,Errors and Exceptions,Errors and Exceptions JS,Errors and Exceptions

Javascript,loops,looping in js


Hi and welcome.

So we have been looking at labels.

We’ve seen an example of how labels are used.

So I just give the label and then whichever code that you want to give that label, you’ll just put within that code or if it is a loop, you’ve seen that you’ll just give the name and then the loop down here.

So let’s do another example.

And in this case, let’s say we wanted to write 1 once and then 2 two times and then 3 three times.

So you get the idea.

So if you want to write like this all the up to 5.

Let’s see how we can do that and in the process also learn how we can use label so that we can skip a few of them.

So if I come back here, so first of all let’s declare 2 variables.

Let me say var i, j; And then, we come down here and we want to create our first loop.

So we’re going to create a loop within a loop, ok.

So the first loop, let’s call it outloop.

Using a label, we give it a label of outloop.

And it’s going to be a ‘for’.

Now for ‘i’ is equals, let’s start from 0, i=0.

And then, we want to say that if i less than 5, and then we want to increment ‘i’, i++.

So there’s our loop beginning.

And then inside this loop, we also want to create another loop.

So let’s call the loop which is inside inloop.

And then in inloop, we also create another for loop.

So for, let’s use j, j=0 and then j less than i.

It should never surpass the value of ‘i’.

Let’s increment ‘j’ by 1.

And then down here, we want to alert, just like that, if we alert the value, the value of ‘i’, then it’s going to print ‘i’ the number of times that ‘i’ correlates with ‘j’.

So if I run this, let’s just run it without using a break or continue, without using a break or continue in any instance.

So first of all if I run this, we have a syntax error somewhere.

Let me see, here.

That’s that.

Remove all these.

Then if we run that, 1.

So if I click again, it will print 2.

And then if I click again, 2.

Then if I click again, 3.

Then I click again, 3.

I click again, 3.

And then I click again, 4.

So if keep clicking, that’s what happens.

So it’s not really visible that much using an alert.

So let’s see how we can do it using a console.log.

If we use a console.log, if you’re using Firefox like me, you can just press Control+Shift+K and that Control+Shift+K and that is going to bring the console.

And if we do that, you see it, it shows us all of this.

If you run it, just run it again.

You can run it again and you’ll see this is what happens.

So we have 1, but it has been run twice.

We have 3, it has been run three times.

So this is also not very clear.

So what I should do is, let’s go back to something that we learnt earlier on how you can use JavaScript in your HTML.

Let me open that file.

So there we go.

So if I open this in the browser, you do remember, we did something like this during the detour.

When we were doing the JavaScript detour, we learned how you can use JavaScript in your HTML.

And so, in the next video, because I don’t want this video to be long, we’re going to take this code and then we are going to put it in our script.

And then, we are going to have it show up in this location.

So I will see you in the next video.


.
GET SOCIAL WITH ME:
FACEBOOK: https://www.facebook.com/rwahowa/
INSTAGRAM: https://www.instagram.com/rwahowa/
TWITTER: https://twitter.com/rwahowa/
VIMEO: https://vimeo.com/bizanosa/
WEBSITE : http://rwahowa.com

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «102 Labels example - JavaScript Tutorial 2018», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

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

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

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