Category "pure-function"

What exactly is a pure function when we are talking about a function within a function

I've learned that a pure function is a function that doesn't alter global state, period. If this is true, functions within functions can alter the state of the

How to insert API response into HTML

I used pure function to create wrapper for multiple HTML elements and don't understand how to insert JSON response API data into it. Can you help to create one