Javascript "for (;;);" structure

Possible duplicate:
Empty "for the Facebook ajax loop,
what does the AJAX response call like (;;); {json data} mean?

While analyzing some facebook ajax body requests, I noticed that each code starts with for (;;);, following the json object

sort of

for (;;); {"a":1,"b":"\u003cdiv"}

I went through this structure but found nothing.

What could be the reason for this โ€œforโ€ structure at the beginning of each ajax answer?

+5
source share
2 answers

A forlike this (note that there is no ';' after the parenthesis):

for (;;)

means an infinite loop in which operators between brackets are executed.

Instead, a for the following:

for (;;);

means endless loop without instruction.

+1

, AJAX. , , - , (ob).

.

0

All Articles