0

I want to clear the console if textbox doesn't contains any value.

https://code.sololearn.com/WaIq1YCs6D9y/?ref=app i checked on the internet about console. clear() method but it doesn't work

5th Oct 2017, 12:56 PM
Virendra
Virendra - avatar
4 Respuestas
+ 9
it might work on an actual browser but the code playground works differently but...why would you display on the console in tbe first place if its not for debugging purposes? just make a div for the results and put them there if there are no results, put blank string edit: nvm i see you already did exactly that but commented it bottom line you cannot remove console log in the sololearn playground once it been displayed
5th Oct 2017, 1:00 PM
Burey
Burey - avatar
+ 9
well, as stated the console works differently in the code playground once its popped up, it is there to stay for the rest of the program lifetime it's for development purposes anyway, for debugging and such so as ling as you eventually don't call it, you should be fine
5th Oct 2017, 1:05 PM
Burey
Burey - avatar
+ 2
ok thanks
5th Oct 2017, 1:08 PM
Virendra
Virendra - avatar
+ 1
i was able to achieve this requirement with divs but i wanted to experiment it with console.
5th Oct 2017, 1:03 PM
Virendra
Virendra - avatar