I'm following a book's tutorial on programmatic constraints and decided to read Apple's programming guide afterwards. I saw the following line of code in Apple's guide which is using a method and a variable in one line of code:
// Pin the leading edge of myView to the margin's leading edge
myView.leadingAnchor.constraint(equalTo: margins.leadingAnchor).isActive = true
I didn't know that it's possible to condense code in this way. Is there a term for this?
Apologies for sounding like a noob but I would like to know.