Function isLandscape

  • Determines whether the current device or browser window is in landscape orientation.

    Returns boolean

    • Returns true if the device is in landscape orientation, otherwise returns false.
    if (isLandscape()) {
    // Codes for landscape orientation
    }