// Define a function to check the size of a filefunctioncheckFileSize(file) {
return file.size;
}
// Usageconst fileInput = document.getElementById('fileInput'); // Assuming you have an input element of type 'file' in your HTMLfileInput.addEventListener('change', function() {
const file = fileInput.files[0];
console.log(checkFileSize(file)); // Display the file size in bytes});