• Tuesday , 17 October 2017

Loops in Javascript – Programming Virgin

Code Canyon



Javascript Loops: https://codebabes.com/courses/programming-virgin/programming-loops
Main JS course!: https://codebabes.com/courses/programming-virgin-javascript

In programming there is a lot of repetition. That’s the thing about computers, they can do stuff over and over again really efficiently. When you’re writing code for a program, there is a shortcut for doing things over and over again. It’s called a loop.

Let’s say you want a piece of code repeated a bunch of times, that’s what a loop can do for you.

We’ll start with the most basic loop, called the while loop. It’s like the if-statement where if something is true it will do something, except it will do that thing over and over again.

Start with while, then parentheses, inside the parentheses, we put our condition. Then, braces, this is where we put the statements or functions we want to execute.

Let’s set a variable counter equal to 0. Then in our while loop parentheses we’ll check if counter is less than or equal to 10. Then let’s add console log “I’ll be back” as the statement to run while the counter is less than or equal to 10. If we just ran it like this it would crash the browser since it would be an infinite loop. The counter value would never be greater than 10, so, the condition would never be false. Let’s log the counter variable, you’ll see it prints zero forever.

What we need to do is increment the counter. Remember the shortcut operator for this? It’s the plus plus operator. Let’s add that to the block.

Let’s add an alert that will run after the loop stops, we’ll do alert “hasta la vista baby” and concatenate the counter variable onto the end. Let’s run this shit!

And boom, hasta la vista baby, and the counter is equal to 11. During the last loop the counter value was 10, but got one more added on so the loop stopped and the alert was executed.

Original source

3d Ocean

Related Posts

43 Comments

  1. michael guild
    October 2, 2017 at 22:50

    LOL this is for real?! I can't even take this video seriously even though I know it's content is correct

  2. My Space
    October 2, 2017 at 22:50

    on seeing loops here…..
    please , let me make a fucking loop in her….
    idiot…. shit.
    Mother Fucker

  3. Mohamed Binothman
    October 2, 2017 at 22:50

    Wow, I'm going to create Porn website after this tut ^_^

  4. tim cook
    October 2, 2017 at 22:50

    I never thought coding can be sexy

  5. William Nicholas
    October 2, 2017 at 22:50

    Omfg this is the best thing ever.

  6. quan
    October 2, 2017 at 22:50

    I seriously need to:

    for (x = arousal; x < climax; x++){
    fap[x];
    }

  7. unfortunately its me
    October 2, 2017 at 22:50

    next time I'll sit with lotions

  8. HENOUZ Radhia
    October 2, 2017 at 22:50

    WTF

  9. Creative Works
    October 2, 2017 at 22:50

    Its when bitch becomes programmer and does her job simultaneously

  10. Deepesh Kumar Jha
    October 2, 2017 at 22:50

    so cheap

  11. Cabdixakiim Yusuf
    October 2, 2017 at 22:50

    and that are problems when girls explaining something!!!!!? i can't watch any more.

  12. Sig Kimber
    October 2, 2017 at 22:50

    Am I supposed to take my clothes off when I learn to code?

  13. rphunt2002
    October 2, 2017 at 22:50

    This series is great. Granted it's a very high altitude overview, but that's a good thing. Not every coding vid has to be an overcaffeinated dweeb mumbling about shell commands. This makes getting to know dev entertaining, fun, and a little more right brained, and of course sexy. And I promise lots of women are watching these too.

  14. RockwireCnR
    October 2, 2017 at 22:50

    All i could see was tits

  15. Adam Phillips
    October 2, 2017 at 22:50

    "Just kidding, Dane Cook sucks." hahahahaha

  16. Harvey Dent
    October 2, 2017 at 22:50

    II hope feminist stay away from this holy place.

  17. Thitiwat Chuen
    October 2, 2017 at 22:50

    Javascript is pretty hard for me, so I keep watching this vdo many times Thanks

  18. Jordicutie iz tha best
    October 2, 2017 at 22:50

    looooooooooool wtf is this

  19. xoce martinez
    October 2, 2017 at 22:50

    subscribed.you actually helped me understand loops thank you!!! HOT!!

  20. Rajib Paul
    October 2, 2017 at 22:50

    A hahaha

  21. subject_17
    October 2, 2017 at 22:50

    What a fantastic way to waste time.

  22. What Done
    October 2, 2017 at 22:50

    Till this day, I actually had to program and watch hot girls on my screen separately.

  23. Andrew Peer
    October 2, 2017 at 22:50

    Love it

  24. Rockin Rehearsal
    October 2, 2017 at 22:50

    code explanations with the animations & off color variable names makes these some of the best for understanding what the codes doing, but the intro is a turn off. It's a bit overboard waiting for it to end is like finger nails on chalk boards

  25. 4zero68
    October 2, 2017 at 22:50

    This girl is from Durban South Africa isn't she?

  26. TheDrLotfi
    October 2, 2017 at 22:50

    You made a mistake sir, it's "Boobs in Javascript"…Thanks

  27. Stefan Landsiedel
    October 2, 2017 at 22:50

    I would be happy about a video of a whole angularjs tutorial explained by a few codeBabes 😉

  28. Firstname Lastname
    October 2, 2017 at 22:50

    I wish she had a bigger brain like her big fake boobs.

  29. Buri
    October 2, 2017 at 22:50

    Nice tutorial. For gays is this just another average video 😛 😀

  30. Coding4Chicks
    October 2, 2017 at 22:50

    Great to see so many female programming teachers on Youtube! 🙂

  31. goldewl
    October 2, 2017 at 22:50

    I like your videos!

  32. Raziaar
    October 2, 2017 at 22:50

    This is the stupidest shit I have ever seen.

  33. Salvatore Conte
    October 2, 2017 at 22:50

    This girl has beautiful boobs

  34. XtremeTV
    October 2, 2017 at 22:50

    i can't concentrate, boobs.:)

  35. SteepVisions
    October 2, 2017 at 22:50

    DOUGLAS CROCKFORD DOESN'T USE ++!!!! just joking.

  36. Julien Loudet
    October 2, 2017 at 22:50

    I usually see women dressed like her in other kind of videos… In this context I have to say I really hate it and I find it to be extremely degrading for women and programmers alike (let them be male or female).
    This video not only assumes that only young male teenagers are interested in programming – the "virgin" – but also that the one way for them to pay attention is to show half-naked women "No brain just boobs!".
    In addition to that this type of content has so many perverse effects: for instance do you really think that programming is just writting few pieces of code with the poster of a pin-up in the background? Such things prevent programming from being taken more seriously and women from wanting to code…
    You simply disgust me.

    TD;DR: Hate it, reinforces stereotype regarding "programming" as being male-only and depicts women only as a sexual object.

  37. Pakalu Papito
    October 2, 2017 at 22:50

    am i from tennessee? cause i’m the only ten i see

  38. Pakalu Papito
    October 2, 2017 at 22:50

    being skinny may be nice but chicken nuggets are even nicer

  39. Utkarsh Srivastava
    October 2, 2017 at 22:50

    i gave my 100% attention to this video..& yet i dint learn anything about javascript.. what am i doing wrong ?

  40. Mike Bertakis
    October 2, 2017 at 22:50

    When I listen Dillon Francis in the start and I'm like "BOOBS AND EDM!"

  41. drew
    October 2, 2017 at 22:50

    GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS  GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS  GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS GALIFIANAKIS

  42. dumbasffff
    October 2, 2017 at 22:50

    Technology has come a long way. Now we can learn code and look at babes at the same time. What a time to be alive. For real though, I doubt people really learned anything from here

  43. Alex G
    October 2, 2017 at 22:50

    was here because of kollege

Leave A Comment

You must be logged in to post a comment.