Computer Network By Geeksforgeeks Javascript Variable Is Undefined