Methods
isArmstrong(input) → {boolean}
This function check whether the input number is armstrong number or not
Function check the input number is armstrong number or not
Parameters:
Name | Type | Description |
---|---|---|
input |
number | the input number to apply check on - (can be of any length) |
Returns:
the output will be the boolean value if the input is armstrong number the it will return true otherwise false
- Type
- boolean
Example
- code
const vnumber_check = require("vnumber-check")
const input = 153
const output = vnumber_check.isArmstrong(153)
console.log(output)
*****
output :
true
isEven(input) → {boolean}
This function check whether the input number is even number or not
Function check the input number is even number or not
Parameters:
Name | Type | Description |
---|---|---|
input |
number | the input number to apply check on - (can be of any length) |
Returns:
the output will be the boolean value if the input is even number the it will return true otherwise false
- Type
- boolean
Example
- code
const vnumber_check = require("vnumber-check")
const input = 121
const output = vnumber_check.isEven(122)
console.log(output)
*****
output :
true
isOdd(input) → {boolean}
This function check whether the input number is odd number or not
Function check the input number is odd number or not
Parameters:
Name | Type | Description |
---|---|---|
input |
number | the input number to apply check on - (can be of any length) |
Returns:
the output will be the boolean value if the input is odd number the it will return true otherwise false
- Type
- boolean
Example
- code
const vnumber_check = require("vnumber-check")
const input = 121
const output = vnumber_check.isOdd(122)
console.log(output)
*****
output :
true
isPalindrome(input) → {boolean}
This function check whether the input number is palindrome number or not
Function check the input number is palindrome number or not
Parameters:
Name | Type | Description |
---|---|---|
input |
number | the input number to apply check on - (can be of any length) |
Returns:
the output will be the boolean value if the input is palindrome number the it will return true otherwise false
- Type
- boolean
Example
- code
const vnumber_check = require("vnumber-check")
const input = 121
const output = vnumber_check.isPalindrome(121)
console.log(output)
*****
output :
true
isPerfect(input) → {boolean}
This function check whether the input number is prefect number or not
Function check the input number is prefect number or not
Parameters:
Name | Type | Description |
---|---|---|
input |
number | the input number to apply check on - (can be of any length) |
Returns:
the output will be the boolean value if the input is prefect number the it will return true otherwise false
- Type
- boolean
Example
- code
const vnumber_check = require("vnumber-check")
const input = 12
const output = vnumber_check.isPerfect(12)
console.log(output)
*****
output :
false