includes(value) {
    if (!value) {
      console.error('A value to search for is required');
      return null;
    }

    let current = this.head;

    // Traverse the list
    while (current) {
      if (current.value === value) {
        return true;
      }
      current = current.next;
    }

    return false;
  }
/**
   * Function to search for a specified value in a linked list
   * @param {*} value Value to search for
   * @returns {boolean}
   */
Function to search for a specified value in a linked list
@param {*} value Value to search for
@returns {boolean}
Function to search for a specified value in a linked list @param { * } value Value to search for @returns { boolean }
includes(value) {
    if (!value) {
      console.error('A value to search for is required');
      return null;
    }
    let current = this.head;
    while (current) {
      if (current.value === value) {
        return true;
      }
      current = current.next;
    }
    return false;
  }
includes ( value ) { if ( ! value ) { console . error ( 'A value to search for is required' ) ; return null ; } let current = this . head ; while ( current ) { if ( current . value === value ) { return true ; } current = current . next ; } return false ; }
Function to search for a specified value in a linked list
 @param {*} value Value to search for
 @returns {boolean}
Function to search for a specified value in a linked list @param { * } value Value to search for @returns { boolean }
// Traverse the list