I linked the JavaScript file to the HTML file, but the alert doesn’t appear. We’re a place where coders share, stay up-to-date and grow their careers. Once unpublished, this post will become invisible to the public and only accessible to Paul J. Williams. So, we can use JavaScript validation to check that the selected file follows the given requirements. As you see, we get the list of files from the file input and pass it to the assertFilesValid. Otherwise, we…