@bytebury/sauce - v2.2.0
    Preparing search index...

    Function last

    • Returns the last thing in a list. If the value is a string, then it will return the last character.

      Type Parameters

      • T

      Parameters

      Returns T

      If an empty list is passed then this will return undefined.

      last("hello"); // "o"
      last([1, 2, 3]); // 3
    • Returns the last thing in a list. If the value is a string, then it will return the last character.

      Parameters

      • value: string

      Returns string

      If an empty list is passed then this will return undefined.

      last("hello"); // "o"
      last([1, 2, 3]); // 3