Comment

Comment by FeepingCreature

    let post = Post.findByID(1)
    if post != nil {
      return post.title
    } else {
      return nil
    }
Or, as a cool C-like would put it:

    let post = Post.findByID(1)
    return post?.title
Just saying!

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton