Class: User

User()

new User()

Class representing a user in the system.

Source:

Classes

User

Methods

generateWelcomeMessage() → {string}

Generates a welcome message for the user.

Source:
Returns:

The welcome message.

Type
string

getShippingAddress(address) → {boolean}

Sets the shipping address with validation.

Parameters:
Name Type Description
address string

The delivery address (must be longer than 5 characters).

Source:
Returns:

True if the address was set successfully, otherwise False.

Type
boolean
Example
user.setShippingAddress("Kyiv, Khreshchatyk 1"); // returns true