How to make our own js console🙄?? Can we?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 16

How to make our own js console🙄?? Can we??

23rd Sep 2020, 12:30 PM
RISHABH
RISHABH - avatar
3 Answers
+ 10
it's simple.😁 just use the <iframe> with a srcdoc ...like this <iframe srcdoc= " "> </iframe> then create an input where we can assign the value of the input to the srcdoc then after that..to catch the errors.... to make your code look like a js console..you can add try { // expression that may be incorrect; } catch(error) { console.error( ifame.message ) }: then the js console is compelete....look at this code though I am not true with it..go to the code playground section https://code.sololearn.com/W8G4HBWB64ax/?ref=app
23rd Sep 2020, 12:43 PM
LIONEL
LIONEL - avatar
+ 4
for simplicity see this example... https://code.sololearn.com/W0qUaQCLM47l/?ref=app
23rd Sep 2020, 12:51 PM
LIONEL
LIONEL - avatar
24th Sep 2020, 7:32 PM
\•/
\•/ - avatar