Endpoint API actions http://api/v1/pets http://api/v1/pets/8765 GET List of all pets Get one pet POST Create a new pet – PUT Replace entire collection Replace or create a pet DELETE Delete all pets Delete one pet API endpoints parameters Path. Example: `/messages/123` Query. Example: `?query=something` or `?categories=cars,helicopters` Body. For non-GET requests. …

Javascript doesn’t have foreach statement, but it’s simple to emulate one: <script type="text/javascript"> var arr = [’one’, ‘two’, ‘three’, ‘four’, ‘five’, ‘etc’]; for (var i in arr) { var element = arr[i]; alert(i + ‘: ‘ + element); } </script> It’s actually equivalent of foreach in other languages like PHP. …