generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

any of you use javascript

Previous Thread :: Next Thread 
CREEPERASHES is not online. CREEPERASHES
Joined: 17 Apr 2015
Total Posts: 162
05 Feb 2016 02:49 PM
hi guys

im using codeacademy to learn javascript I got stuck reply to me and ill show u the question
Report Abuse
gloriousryan is not online. gloriousryan
Joined: 28 Feb 2010
Total Posts: 299
05 Feb 2016 02:50 PM
I think this question would be better answered on StackOverflow
Report Abuse
Dralian is not online. Dralian
Joined: 21 Mar 2013
Total Posts: 7624
05 Feb 2016 02:51 PM
whats the code?

also, dont use codeacademy in my opinion, learn the basics from that, but use treehouse or something
Report Abuse
CREEPERASHES is not online. CREEPERASHES
Joined: 17 Apr 2015
Total Posts: 162
05 Feb 2016 02:58 PM


Controlling the for loop


We can now control where the for loop starts and ends. What about controlling what happens in between?

The examples we've looked at have used i = i + 1. This has meant we have incremented (increased) the variable i by 1 each time.

Rules to learn

a. A more efficient way to code to increment up by 1 is to write i++.
b. We decrement down by 1 by writing i--.
c. We can increment up by any value by writing i += x, where x is how much we want to increment up by. e.g., i += 3 counts up by 3s.
d. We can decrement down by any value by writing i -= x. (See the Hint for more.)
e. Be very careful with your syntax—if you write a loop that can't properly end, it's called an infinite loop. It will crash your browser!



Instructions

01. This code counts every number from 0 to 35.
02. Make it start counting from 5. Please!
03. Stop the counting when it prints out 50.
04. Only count every fifth number. So we want to increment i by 5.



?

Hint

Get live, fast support from Codecademy Advisors when you get stuck. Learn more.
The changes to be made:

a. Replace 0 with the value you want the for loop to start.
b. Replace 36 with where you want the for loop to end.
c. Currently, the for loop increments up by 1. You want it to increment up by 5!

Note: x += y is the same as x = x + y. And x -= y is the same as x = x - y.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
05 Feb 2016 02:58 PM
Click the Q&A forum button..
Report Abuse
CREEPERASHES is not online. CREEPERASHES
Joined: 17 Apr 2015
Total Posts: 162
05 Feb 2016 03:02 PM
it doesn't help
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
05 Feb 2016 03:04 PM
it should help better than we do
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
05 Feb 2016 04:13 PM
just give up
Report Abuse
CREEPERASHES is not online. CREEPERASHES
Joined: 17 Apr 2015
Total Posts: 162
06 Feb 2016 12:41 AM
I get bc on 30% and im on 28%
Report Abuse
adam1717 is not online. adam1717
Joined: 07 May 2011
Total Posts: 960
06 Feb 2016 12:43 AM
Uhm, are you trying to cheat?

You're only cheating yourself.
Report Abuse
CREEPERASHES is not online. CREEPERASHES
Joined: 17 Apr 2015
Total Posts: 162
06 Feb 2016 12:46 AM
I Did it when I read it carefully!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image