OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Console.log prints value and prints 'undefined'?

  • Thread starter Thread starter Raghul SK
  • Start date Start date
R

Raghul SK

Guest
when we provide the value in the console.log, it prints the given value and provides an undefined.

enter image description here

why there is an undefined after printing the value. if the return type of console.log is undefined, it should print before the given value gets printed.

Can anyone explain this scenario?

<p>when we provide the value in the console.log, it prints the given value and provides an undefined.</p>
<p><a href="https://i.sstatic.net/eASzMPGv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/eASzMPGv.png" alt="enter image description here" /></a></p>
<p>why there is an undefined after printing the value. if the return type of console.log is undefined, it should print before the given value gets printed.</p>
<p>Can anyone explain this scenario?</p>
 
Top