I am using the below mentioned code to call a function(addCard) ,which adds images to the web page. The browser freezes due to this. If I call a simple function which does n