Display strings from a list in a text box

I think I am just missing one simple thing. I have an inputfield, button and two text boxes. The first text box(“output”) is pulling its text from the inputfield. I want the second textbox(“englishWords”) to pull its text from the list that is being made. sender() is what the button calls.

Here is my code

     using UnityEngine;
     using System.Collections;
     using UnityEngine.UI;
     using System.Collections.Generic;

     public class butt : MonoBehaviour {

public GameObject input;
public GameObject output;
public GameObject englishWords;
public List<string> words = new List<string>();

public void sender()
{

	output.GetComponent<Text> ().text = input.GetComponent<InputField> ().text;
	input.GetComponent<InputField> ().text = "";
	words.Add (input.GetComponent<InputField> ().text);
	


	for (int i = 0; i < words.Count; i++) 
	{

		englishWords.GetComponent<Text> ().text = (words*);*
  •   }*
    

}

input.GetComponent ().text = “”;
words.Add (input.GetComponent ().text);

You’re setting the InputField’s text to an empty string and then adding the InputField’s text (the empty string) to the words list, you should add the new word to the list first.

for (int i = 0; i < words.Count; i++)
{
    englishWords.GetComponent<Text> ().text = (words*);*

}
You’re setting the text value for each word in the list, but you’re overwriting the previous value each time. You have to append the words instead, something like this:
englishWords.GetComponent ().text = “”;
for (int i = 0; i < words.Count; i++)
{
englishWords.GetComponent ().text += words*;*
}