Hacker News new | ask | show | jobs
by TecoAndJix 788 days ago
Always learning something new[1]:

"The difference between which and that depends on whether the clause is restrictive or nonrestrictive.

In a restrictive clause, use that.

In a nonrestrictive clause, use which.

Remember, which is as disposable as a sandwich wrapper. If you can remove the clause without destroying the meaning of the sentence, the clause is nonessential (another word for nonrestrictive), and you can use which.

[1] https://www.grammarly.com/blog/which-vs-that/#:~:text=Which%....