if a file is selected then display something in html/javascript

I want if a user select an image within <input type='file'> then display the image right next to the input for the user to know that the picture has been uploaded successfully. and I want to use HTML and JAVASCRIPT for this matter.

I have searched internet for it but got nothing from it