News for hackers. Stuff that matters.
Re:Oddities about JavaScript by JeremyBanks on Monday May 30, 2011 @10:22AM (#2599451)
This Python

    def a():
        return
        False;
returns None.
Re:Oddities about JavaScript by qntm on Monday May 30, 2011 @12:57PM (#2599835)
That's because in Python the line break is the statement terminator.
Re:Oddities about JavaScript by JeremyBanks on Monday May 30, 2011 @01:15PM (#2599893)
Python and JavaScript both accept semicolons or line breaks to terminate statements. JavaScript's syntax problems are a bit more subtle than just that.
Re:Oddities about JavaScript by riffraff on Monday May 30, 2011 @12:57PM (#2599836)
Same in ruby

    def foo
     return
     true
    end
returns "nil"