Javascript – continuously, respectively send requests to server

continuous

Sometime you may want to send requests continuously to server with one request each time ( like a foreach in PHP, or for x in array or .each in Ruby …). we have ‘for’ and ‘for .. in’ loop but it’s not smart enough to wait for an Ajax request to be responded. so it doesn’t help us to fulfill our target. what should we do to loop through array, send Ajax request to server with data from array element and wait for response before sending new request ?

Continue reading

What Starts with F and ends with K

A first-grade teacher, Ms Brooks, was having trouble with one of her students.  The teacher asked, “Harry, what’s your problem?”Harry answered, “I’m too smart for the 1st grade. My sister is in the 3rd grade and I’m smarter than she is!  I think I should be in the 3rd grade too!”Ms. Brooks had enough.  She took Harry to the principal’s office.

While Harry waited in the outer office, the teacher explained to the principal what the situation was. The principal told Ms. Brooks he would give the boy a test.  If he failed to answer any of his questions he was to go back to the 1st grade and behave.  She agreed.

Harry was brought in and the conditions were explained to him and he agreed to take the test.

Continue reading