How To Call Function Inside Another Function In Javascript