Function Within Function In Javascript Geeksforgeeks