Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Let's hope you don't have a baz.


you can torture the logic further:

let x : Something = outer_conditional ? baz() : conditional ? foo() : bar()


I think this can look pretty nice, properly formatted:

    let x = conditional1 ? bar() :
            conditional2 ? baz() :
            conditional3 ? quux() :
            someDefault




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: