Function to check whether its k root is an integer or not
function check ( no , k ) { let kth_root = nthRoot ( no , k ) ; let num = Math . floor ( kth_root ) ; if ( Math . abs ( num - kth_root ) < 1e-4 ) return true ; return false ; }