It's not always things work as expected. There are a few ways to get help from k6 in order to find what happens while your script is running.
As is the case with JavaScript executed in the browser, k6 supports console.log and console.error functions. We can use them to output useful information or debug our script.
import http from "k6/http";