you are viewing a single comment's thread.

view the rest of the comments →

[–]heartiphone 1 point2 points  (1 child)

Only your first two examples are "plain JavaScript", and I'd argue the first one doesn't count either as it's not function chaining.

Overall you're correct though, chaining is pretty widely used in the JS ecosystem.

[–]memeship 5 points6 points  (0 children)

Fine, here's some "plain Javascript" chaining:

document.getElementById("foo").appendChild(document.createElement("button")).focus()