Convert console.log() to print() in javascript
Nikhil Chandra Roy

Nikhil Chandra Roy @nikhilroy2

About: Front-End Web Developer with JavaScript, ReactJs and Backend Python(Django)

Location:
Bangladesh
Joined:
Jan 16, 2020

Convert console.log() to print() in javascript

Publish Date: Dec 12 '20
3 2

So, this is just tiny post about javascript convert console.log() to print().

As a python developer it is easy to see output by doing print() so we also using print() instance of console.log() so that we don't need to write console.log() again and again.
below the codepen click JS to see the code and console for demo.

stay with me to get more post like this.
Thanks.

Comments 2 total

  • shadowtime2000
    shadowtime2000Dec 12, 2020

    You don't even need to do that. You can just do

    const print = console.log
    
    Enter fullscreen mode Exit fullscreen mode
Add comment