So, I know I can get current time in milliseconds using JavaScript. But, is it possible to get the current time in nanoseconds instead?
No. There is not a chance you will get nanosecond accuracy at the JavaScript layer.
If you're trying to benchmark some very quick operation, put it in a loop that runs it a few thousand times.