how to make a select button in unity code example

Example 1: how to make text show a variable in unity

using UnityEngine.UI;  //its a must to access new UI in script
 public class YourClass : MonoBehaviour
 {
     public Text Score_UIText; // assign it from inspector
 void Start()
 {
    Score_UIText.text = yourscore_variable;
 }

Example 2: how to make a button disapear on click in javafx

public void letterChosen(ActionEvent event) {
    Button source = (Button) event.getSource();
    source.setVisible(false);
    System.out.println("pick: "+source.getUserData());
}

Example 3: How to set back button text in Swift

let backButton = UIBarButtonItem()

backButton.title = "name"

self.navigationController?.navigationBar.topItem?.backBarButtonItem = backButton