Function isPortrait

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

    Returns boolean

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