Complete the code to get the total number of requests run in the collection.
let totalRequests = collectionRunner.results.[1];The length property gives the total number of requests in the results array.
Complete the code to access the status code of the first request result.
let statusCode = collectionRunner.results[0].response.[1];
The statusCode property holds the HTTP status code of the response.
Fix the error in accessing the response time of the last request result.
let lastResponseTime = collectionRunner.results[collectionRunner.results.[1] - 1].responseTime;
The length property gives the number of items in the results array, so subtracting 1 gives the last index.
Fill both blanks to filter results with status code 200 and map their response times.
let fastResponses = collectionRunner.results.filter(r => r.response.[1] === 200).map(r => r.[2]);
Use statusCode to check the HTTP status and responseTime to get the time taken for each response.
Fill all three blanks to create an object with request names as keys and their response codes as values for successful requests.
let successStatus = { [1]: [2].name, [3]: [2].response.statusCode };Use key and value as placeholders for object keys and values. The first result's name and statusCode are used here.