Reputation: 6307
So I was using getElementById method and consoled it when I'm consoling with string it just displays string object like this [Object]
i want to display it as Object
var element = document.getElementById('input');
console.log("the view element "+ element );
Upvotes: 1
Views: 53
Reputation: 3251
console.dir is your friend.
var el = document.querySelector('div');
console.dir(el);
<div>Stuff</div>
Upvotes: 0