3 ms·
I can see why you would think that but it does work because a script that just contains a JSON object is not a valid JavaScript file. The browser will give an e
by alanning 15y ago
I can see why you would think that but it does work because a script that just contains a JSON object is not a valid JavaScript file. The browser will give an error. Whereas a script that just contains a JSON array is valid.