Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
</body>
</html>
 
var input = ["1   2560*1600",
"2   1366*768",
"3   1280*800",
"4   1280*768",
"5   1024*768",
"6   1024*600",
"7   960*640",
"8   960*540",
"9   854*480",
"10  800*600",
"11  800*480",
"12  800*400",
"13  640*360",
"14  640*240",
"15  480*320",
"16  400*240",
"17  320*240"]
    for(var i=0; i < input.length; ++i) {
      var s = input[i].split(" ");
      for(var j=0; j < s.length; ++j) {
        if(j > 0 && s[j]) {
          console.log("resolution=" + s[j] + " - Ratio: " + s[j].split("*")[0] / s[j].split("*")[1]);
        }
      }
      
    }
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers