1. In node.js, the value usage ${} is in a string, but in console.log output, the console gets a string with ${} and does not replace the value of the variable.
app.use(async (ctx, next) => {
const start = new Date().getTime();
await next();
let ms = new Date().getTime() - start;
console.log("Time: ${ms}ms");
});
as shown in the code above, take out the value of the variable ms with ${} in console.log (), but in the final console output, you get the following result:
Time: ${ms} ms
May I ask what"s going on?