127
c posting (lemmy.world)
submitted 6 months ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 5 points 6 months ago* (last edited 6 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
127 points (92.6% liked)

pissposting

1097 readers
1 users here now

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

founded 1 year ago
MODERATORS