Q:

Can I display console.log messages on Iframe

Can I display console.log messages on Iframe if yes can then please also tell me how to display it, I am creating a vary simple JS game and I want to display my logs on iframe. 

A:

You can try the following approaches:

change your logging so that you can target both console and some iframe. This has the advantage that you can have a separation between what is displayed on screen and what is logged, but you have to work more
override console.log, so that you can also do something else with output data

