JavaScript DOM manipulation for dynamic input display with truncation

I am working on a web project and need assistance with JavaScript DOM manipulation. I want to create a simple interface with an input box, a submit button, and a dynamic display of entered data in boxes. Additionally, if the input value is more than 6 letters, I want to truncate it and display it with “