IF ELSE statement not working?

Thanks alot :slight_smile:

How to write two conditions in if statement.
my code is like
let minsize = 3000000 ;
let maxsize = 10000000 ;
let files = $w( " #uploadButton1 " ).value;
let fileSize = files[ 0 ].size;
if (fileSize >= minsize && fileSize < maxsize){
console.log( ā€œValid Sizeā€ );
} else {
console.log( ā€˜Invalid Size’ )
}
It’s not worked for me.
And please let me know how to throw an error in else condition and how to display it.
Please help.
Thanks.

Thanks! This so helped me solve my problem, whereby I can now hide strips on my pages when there is no relevant data for the fields in that stip. I adapted the code as shown in the image. BTW, this is the first JavaScript I have ever done, so double thanks for your helping me and others :sunglasses: