// Find screen resolution based on ratio
function findScreenHeight(width, ratio) {
  const [widthRatio, heightRatio] = ratio.split(':')
  const height = width / widthRatio * heightRatio
  return width + 'x' + height
}
findScreenHeight(1280,"16:9"); // '1280x720'