Recipe 16.7

Logging a Variable and Its Value

Demo

Check the console for output. You may need to refresh the page after opening the console.

Code

JavaScript
const username = 'sysadmin';

console.log({ username });
HTML
Check the console for output. You may need to refresh the page after opening the console.
Web API Cookbook
Joe Attardi