JS-Code in fetch_basecamp/02_step/02_fetch_data.php

let btn = document.getElementById("call_fetch_btn");
btn.addEventListener("click", wakeUpFetch);

function wakeUpFetch() {
	fetch("resources/02_resource.php")
	// Want to have the response as JSON
	.then((response) => response.json())
	// Write the data into the console
	.then((data) => console.log(data));
}