I need to find whether a number is rational or not in javascript.

could somebody help?