<div id="test">IsRayNotArray</div>
<button class="btn">Button</button>
<div class="content">
<p>Content</p>
</div>
<input type="text" name="name" value="Ray" />
const test = document.querySelector('#test');
console.log(test); // <div id="test">IsRayNotArray</div>
const btn = document.querySelector('.btn');
console.log(btn); // <button class="btn">Button</button>\
const content = document.querySelector('.content p');
console.log(content); // <p>Content</p>
const name = document.querySelector('input[name="name"]');
console.log(name); // <input type="text" name="name" value="Ray">
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.