Data Types
Number

Number

Reverse the number

import { reverseNumber } from "quark-dsa";
 
let num = 5698;
reverseNumber(num); // returns 8965

Check a number is prime number

import { isPrime } from "quark-dsa";
 
let num = 37019;
isPrime(num); // returns true;

Check a number is palindrome

import { isNumberPalindrome } from "quark-dsa";
 
let num = 1562651;
isNumberPalindrome(num); // returns true;