SasayakiJoin Date: 2007-06-29 Post Count: 33868 |
Does JavaScript work like Lua in the sense that
var kk = true;
while (kk) {
kk = 5
};
Is this an infinite loop
IN JAVASCRIPT NOT ROBLOX LUA. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Yeah |
|
|
Try it and see.
But does JS really not have a ';' at the end of "kk = 5" but has one after the '}'?
Also, you might get a comparison error (Or I do in Java) |
|
SasayakiJoin Date: 2007-06-29 Post Count: 33868 |
I forgot the ; there
And I dont want to test an infinite loop @Not
ty @cnt. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
JS automatically inserts semi-colons for you
|
|
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Nah it's not. It makes inconsistent poop:
If you like to program like this:
function a()
{
}
And want to be consistent and return an object:
return
{}
HA you can't nerd |
|
|
Oh, that's stupid :(
TBO I like how you need them in Java, makes everything seem more logical ;) |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Can't you have as many semi-colons as you want in Java?
system.out.println("blah");;;;; would work (last time I checked) |
|
|
SasayakiJoin Date: 2007-06-29 Post Count: 33868 |
whats the point though |
|
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
lol you can do the multi-semi-colon thing in javascript too.
window.alert(666);;;;;;;;;;;; |
|
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
But I tested this on the lua site:
print(1);;;
(http://www.lua.org/cgi-bin/demo) |
|
|
Maybe its because its Lua 5.2 :P |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
I don't see why they would make that a feature. God next time I obfuscate code, I know what I'm doing |
|