Members
# constant areaOfCircle
Calculates the area of a circle based on its radius.
# constant areaOfCircle
Calculates the area of a circle based on its radius.
# constant checkEmail
Checks whether an email is valid or not based on a regular expression.
# constant checkEmail
Checks whether an email is valid or not based on a regular expression.
# constant checkLeapYear
Checks if a given year is a leap year or not.
# constant checkLeapYear
Checks if a given year is a leap year or not.
# constant checkNumber
Checks whether a given value is a number or not.
# constant checkNumber
Checks whether a given value is a number or not.
# constant checkPveNve
Checks if a given number is positive, negative or zero.
# constant checkPveNve
Checks if a given number is positive, negative or zero.
# constant generateOTP
Generates a random OTP (One Time Password) of a given length.
# constant generateOTP
Generates a random OTP (One Time Password) of a given length.
# constant maxNumber
Finds either the maximum or minimum number from an array of numbers.
# constant maxNumber
Finds either the maximum or minimum number from an array of numbers.
# constant operation
Performs a mathematical operation on two numbers using the specified operator.
# constant operation
Performs a mathematical operation on two numbers using the specified operator.
# constant phoneNumber
Checks if a given phone number is valid or not.
# constant phoneNumber
Checks if a given phone number is valid or not.
# constant primeNumber
Determines if a given number is a prime number or not.
# constant primeNumber
Determines if a given number is a prime number or not.
# constant simpleinterest
Calculates the simple interest based on the principle, rate, and time.
# constant simpleinterest
Calculates the simple interest based on the principle, rate, and time.
# constant squareOf
Calculates the sum of squares of the digits of a given number.
# constant squareOf
Calculates the sum of squares of the digits of a given number.
Methods
# checkIsEmpty(enter) → {boolean}
Checks if a given value is empty or not.
Parameters:
Name | Type | Description |
---|---|---|
enter |
string
|
The value to be checked for emptiness. |
- Returns true if the value is empty, false otherwise.
boolean
# function add(n1, n2) → {number}
Adds two numbers and returns the result.
Parameters:
Name | Type | Description |
---|---|---|
n1 |
number
|
string
|
The first number to be added. |
n2 |
number
|
string
|
The second number to be added. |
- The sum of the two numbers.
number
# function invalidNumber(number) → {boolean}
Determines if a given number is invalid, i.e., not a number.
Parameters:
Name | Type | Description |
---|---|---|
number |
number
|
The number to be checked. |
- Returns true if the given number is invalid, false otherwise.
boolean