function take_order(name, callback1) {
console.log("order has been taken.");
callback1(name);
}
function prosess_order(name, callback2) {
console.log(`prosesing order for ${name}.`);
callback2(name);
}
function deliver_order(name) {
console.log(`deliver to ${name}.`);
}
take_order("Mohiul", function (name) {
prosess_order(name, function (name) {
deliver_order(name);
});
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body></body>
</html>
How does the "deliver_order" function receive the value of the name variable? How is it able to print with the name value? Please provide an explanation regarding this process. (This code snippet was obtained from a tutorial)