How to use console log with C-style printf format specifiers in Node.js

1 Answer

0 votes
console.log("Hello %s %f, welcome to %d", "PI", Math.PI, new Date().getFullYear());




/*
run:

Hello PI 3.141592653589793, welcome to 2022

*/

 



answered Nov 24, 2022 by avibootz

Related questions

...