What is lexical scope?

I understand them through examples. 🙂 First, lexical scope (also called static scope), in C-like syntax: Every inner level can access its outer levels. There is another way, called dynamic scope used by the first implementation of Lisp, again in a C-like syntax: Here fun can either access x in dummy1 or dummy2, or any x in any function that call fun with x declared in it. will print 5, will print 10. The … Read more

failed to load resource: the server response with a status 500 (internal server error)

If your _service.getCardList() returns null then the foreach will throw an exception which you have not handled. Maybe that is the reason you are getting (500) internal server error and not the jquery url, as 500 error code suggests that something went wrong in the server code. As a suggestion, You should use implement try – catch and log the exceptions somewhere to be able to … Read more