THIS WHILELOOPS IN JAVASCRIPT IS KILLING ME

Anonymous [happyguy4]
12 years ago

0

I CAN DO ALMOST EVERYTHING IS JAVASCRIPT BUT CANT DO WHILE LOOPS I WASTED MY FUCKIN 3 WEEKS
PRACTICING THIS BUT STILL CANT FINISH…….

VAR X = 1
WHILE(X<3){
CONSOLE.LOG(X);
X++;
}

9replies
9voices
187views
daMage
12 years ago

0

  1. Don’t post in all caps
  2. What is your problem with the while loop?
  3. what are you trying to finish?

0

hahaha , still cant understand the situation :P

Walter
12 years ago

0

go learn more about java. maybe it helps

Luke [flabbyrabbit]
12 years ago

0

@happyguy4 try using lower case, it might help

@Walter java != javascript

Genesis [Fromwarriors]
12 years ago

0

Find examples online of code using WHILE statements, then incorperate it into your code. Plus, what are you trying to finish?

slaine
12 years ago

0

try this !

var myVar = 0;

while(myVar < 5) {
console.log(myVar);
myVar++;
}

You will see a blank page!
check your Web console in Firebug while runing this !

Want to print it out on your webpage use document.write(myVar);

Honey Boo Boo [Ski900]
11 years ago

0

Google Karel the Robot, its what they use to for basic programming (java) in a lot of colleges. You should be able to find a free download to Understanding Java. I used this in college, its great. Plenty of info on “while” loops.

Honey Boo Boo [Ski900]
11 years ago

0

Have you considered a for loop? They are a lot easier to work with.
for(var myVar = 0; myVar < 5; myVar++) { console.log(myVar); }

Hopefully this helps out

heavenlyMe
11 years ago

0

after read your posting i still can’t understand what your problem is.
please state it briefly.

You must be logged in to reply to this discussion. Login
1 of 10

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss