Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts
Original source
39 responses to “Beginner JavaScript Tutorial – 19 – for Loop”
My school uses your videos for our college classes!
Am I the only one who was continuously bothered by the spelling of black? It might just be my OCD.
for (x=0; x<=100; x++){
document.write("i love scarlett johanson </br>");
}
It is definitely "curly brace". The other form is "curly bracket". Both correct. Just like 'mice and mouses' for computer mouse ha.
javaScript support forEach ?
() =parenthesis
{} = braces or curly brackets
[] = brackets
<< and >> = angle brackets
well explained
the curly brackets are called braces.
{These are just called braces, or curly brackets}
You don't love her…you can't even spell her name right.
Got a lil confused on this one. I get the concept but not the equation.
I'd like to mention that var is needed:
for (var i = 0; i < N; i++) {}
defines i locally, while
for (i = 0; i < N; i++) {}
actually references a global variable i.
Say you call Foo() from inside the loop, and Foo itself uses i in a for loop –
That's a bug on your hands…
i'm still a bit confused….
Danke Bucky ?????✌️
1:30 For those curious about the official names of stuffs, I looked it up Full explanations: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators
() Parentheses
[] Brackets
{} Braces
; Semi-colon
: Colon
% Remainder
++ Increment
** Exponential (e.g. 2 ** 3 = 2*2*2)
&& "and also"
|| "and/or"
! "is NOT"
> "Greater than" sign
< "Lesser than" sign
= assignment operator, "is"
!= "is not equal to"
<= "less than or equal to"
>= "greater than or equal to"
== "is equal to" (equal, doesn't need to be same type of variable)
=== "is exactly equal to" (equal and same type of variable)
Wasn't Rebecca Black like 14 when you made these? lol
called loop body !!!
Hey thanks, Bucky.
I joined the i and "hello" to show how the number incremented by 2 each time.
……………………………………………………………………………………………..
<script type="text/javascript">
for(i=2; i<=10; i+=2){
document.write(i + " hello</br>");
}
</script>
grrr so im doing an exercise on team tree house in for loops and i did it correctly but they wont let me bypass
first 19 tutorials are pretty much same as c++
"I love rebeccablack"
Nice lessions are ….hehehe but i dont like Rebeca Black ..lolz 🙂 😛 😉
1:29 officially ,they are called braces
If anyone else had explained that my head would of exploded.
# Any know a good application for a loop?
#beginnerhere
You can just call them brackets nigga. []
but because they have curl in them { } they are called CURLLLLY brackets..
LMAO, enjoy 🙂 :
<html>
<head>
</head>
<body>
<script type="text/javascript">
for(x = 1; x < 31; x++){
if(x % 3 == 0){
document.write("Gotta get down on Friday!" + "<br/>");
}else{
document.write("Friday!" + "<br/>");
}
}
</script>
</body>
</html>
" you can't just type the number of time you want to print it out,cause that would be way too easy.And for some reasons programming can't be easy that's why they had to figure out another way to write how many times you have to print it"
^-^
"then it will be way to easy" , lol
I was always taught:
[ ] = brackets
{ } = braces/curly brackets
But this was for English, could be called something else in the computer world
I think {} are called compiler directives
thanks bucky. i'm going to make $1m b/c of these vids
{}-> Blocks
()-> Indicates a fuction
Gotta love Rebecca Balck
I must say, you explain it so well! I was having a hard time learning JavaScript and these vids have been very helpful 🙂 Thank you Bucky!!!!
for(x=0;x<10;x++){
document.write("Get rekt fggt by falcon overlord <br />");
}
Thanks!! Love your video… Easy to understand….
if you review your video you can see that you don't love rebecca bLAck at all 🙂
anyway, great vids!
Mister Bucky, your videos have been very usefull ! Thanks!
it doesnt work….. (im using netbeans)