title: How does a block with curly braces and parentheses work?
body: <pre><code>let loginRegisterButton:UIButton = {
      let button = UIButton(type: .system)
      button.backgroundColor = .white
      button.setTitle("Register", for: .normal)
      button.translatesAutoresizingMaskIntoConstraints = false
      button.setTitleColor(.white, for: .normal)
      return button
  }()
  </code></pre>
  
  <p>is this variable or function , why does it return value? why do we call it? it does not work without <code>parenthesis</code>,why?</p>