webmanz Posted March 23, 2018 Report Share Posted March 23, 2018 1. I was wondering why alert argument has only one apostrophe and console log has two in this example below? 2. Can we say the console log has an argument too? document.getElementById("secondP").onmouseover=function(){alert('Mouse over second P'); console.log("Log the anonymous Inner function on secondP") Quote Link to comment Share on other sites More sharing options...
administrator Posted March 23, 2018 Report Share Posted March 23, 2018 Hi! 1. It could be either or (1 or 2 apostrophes) ... doesn't matter. 2. Yes. The function 'log' is actually part of the object 'console'. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.