title: Constant 'weight' inferred to have type '()', which may be unexpected
body: <p>I am doing Angela Yu ios development bootcamp online, seems that some code is a bit outdated, stuck on this error, that I don't know how to fix.</p>
  <pre><code> @IBAction func weightSliderChanged(_ sender: UISlider) {
          let weight = weightLabel.text = String(format: &quot;%.2f&quot;, sender.value)
          
          print(weight)
          
          weightLabel.text = &quot;\(weight)kg&quot;
  </code></pre>
  <p>I don't know what is data type (), also app works perfectly before I put weight in a constant. When I put it in a constant, it just prints ()kg on the weightLabel</p>