Trying to write a function that will test conditions with certain browser window size using JavaScript. For example:
if ( window.width <= 500 && window.height <= 500){
do something ;
}else{
do something;
Are there any existing commands for JavaScript?