0

Can I log a custom Message to the web development console? If so,how?

If you check this console for example:

http://passion4web.co.uk/ben/pong

The console logs a message when you press keys. I want to do it so that when my JavaScript loads on to my page it displays a message in the console like

"JavaScript file - ENABLED".

(If it can't be in JavaScript I will take jQuery too)

Thank you!

Jameem
  • 1,840
  • 3
  • 15
  • 26
insanewolfhd
  • 81
  • 1
  • 11

2 Answers2

0

Use console.log(msg) to log things to the console.

Console.log()

Amir Popovich
  • 29,350
  • 9
  • 53
  • 99
0

Use the following:

console.log('message');

But be aware of: Is it a bad idea to leave "console.log()" calls in your producton JavaScript code?

Community
  • 1
  • 1
user1915201
  • 103
  • 1
  • 9