Tuesday, 2 October 2018

node.js: console.dirxml(...data): Logs the information

console.dirxml(...data)
At the time of writing this post, this method calls console.log() by passing it the arguments received.

HelloWorld.js

console.dirxml("Hello World"); 

const code = 5;
console.dirxml('error #%d', code);

Output
Hello World
error #5


Previous                                                 Next                                                 Home

No comments:

Post a Comment