showing results for - "javascript add text to textarea overwrite"
Warren
18 Aug 2017
1var $log = $('#myTextArea');
2
3function log(text) { //Remember to clear your text variable each iteration
4    $log.empty();
5    $log.append(text);
6}
7
8// Whichever function during which you want to print to the text area:
9//...
10log("Hello world!");
11//...