How To Find Time Complexity In Js