• janAkali
    link
    English
    5
    edit-2
    4 months ago

    Ew. I usually don’t use curly braced languages. But whenever I need to define collections on multiple lines I always put opening bracket on the end of the line and closing bracket on the same indent level as the start of the statement:

    let hello = [
      "Hello, there!",
    ]
    var
      a = true
      arr = [
        "line 1",
        "line 2",
      ]