97
c posting (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] janAkali@lemmy.one 4 points 8 months ago* (last edited 8 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",
  ]
this post was submitted on 23 Feb 2024
97 points (92.9% liked)

pissposting

969 readers
14 users here now

Piss tier memes, lower than shitposts. Brain damaging stuff.

founded 1 year ago
MODERATORS