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 » Scripting Helpers
Home Search
 

Re: JavaScript question

Previous Thread :: Next Thread 
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
12 Mar 2013 03:37 PM
does javascript require a semi colon after every line?

I'm kind'f confused, if not, what lines require it?


|-MassiveGman-| ~|Law Of Inertia|~
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
12 Mar 2013 03:38 PM
WNTS oh wait.

http://inimino.org/~inimino/blog/javascript_semicolons
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
12 Mar 2013 03:39 PM
It does not require it, however, you should. It will not operate consistently across all browsers under all circumstances if you don't provide semicolons.

A semicolon should appear at the end of every statement (e.g., anything not a control structure.)
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
12 Mar 2013 03:39 PM
Any line that isn't flow control.
if(bool){ --Doesn't need semicolon
foobar = true; --Does, since you are just doing arbitrary code
}

Although, I think you can put semicolons after }'s and it will just ignore them.
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
12 Mar 2013 03:39 PM
No, not EVERY line.

It usually requires semicolons after defining a function, like after each line, and sometimes variables.
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
12 Mar 2013 03:39 PM
Seriously?
bleh

big change from Lua, I'll tell you that.

> :C



|-MassiveGman-| ~|Law Of Inertia|~
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
12 Mar 2013 03:41 PM
Basically every other language does the exactly same thing, sooooo good luck with that.
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
12 Mar 2013 03:51 PM
thanks for the luck
c:




|-MassiveGman-| ~|Law Of Inertia|~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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