console.log returns null - Javascript [closed]

-2

I'm new to JavaScript and not very handy ..

When creating a simple console.log, it returns me first NULL, and then the value of the element ..

I wonder what this NULL means? How to remove it? Is this normal?

Here is the code for review:

var $cardColors = document.querySelector('.card-colors');
console.log($cardColors);

In the console it appears:

null
<li class="card-colors card-colors_colorFirst">

Thank you in advance for the help!

Note: I am a beginner hehe: D

    
asked by anonymous 27.07.2018 / 20:02

1 answer

-2

Problem solved guys !!

When checking the code from end to end, I checked that I invoked the "script" at the beginning of the code and at the end !!

Thanks a lot for your help, it was of great importance to solve my problem! : D

    
27.07.2018 / 21:56