OZONE Asylum
Forums
DHTML/Javascript
Drum roll - twenty liners rules discussion
This page's ID:
29904
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[quote] [b]liorean said:[/b] The rules we have set about function declarations makes the first code count as two lines. I'd therefore argue that the second code should also count for two lines. [/quote] Agreed. However something interests me. What do you think of the following code: [code]if (!myFunctionA() && !myFunctionB() && !myFunctionC() && !myFunctionD() && !myFunctionE()) {}[/code] 1 line? This could be used like that: [code]function f(m) { document.write(m); } ((condition) && !f("1") && !f("2"))?f("3"):f("4"); [/code] if condition is true then it will print "123" if not then it will print "4" you could also add stuff to the "else" side: [code]((condition) && !f("1") && !f("2") || (f("4") || f("5")))?f("3"):f("6");[/code] now if condition is false it will print "456" Could this be considered an exploit of the rules or not? [small](Edited by [url=http://www.ozoneasylum.com/user/3736]Arthurio[/url] on 01-24-2008 13:37)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »