+ 1
search finder
theres 2 textareas. u put some text in one textarea, now the 2nd textarea is where the magic happens, for example if i put the word "hi" in the first textarea, and the seconds says the letter "h" i want it to output "hi", my split is not working u know why? https://code.sololearn.com/WYyDD611cvN4
7 Answers
+ 3
ODLNT
You're right about that. But too bad I'm not clearly understanding OP's actual intention for output ...
If 1st textarea contains "hi", and 2nd textarea contains "h" then the expected output will be "hi". This part is rather confusing as to how and why : )
* OP deleted original code. Relevance is gone, better leave this now.
+ 2
<result> is an object, convert it to string first before splitting
... .innerHTML = result.toString().split( " " );
+ 2
Ipang does the String method match return an object or an array?
+ 2
ODLNT
An array, as per MDN
https://developer.mozilla.org/id/docs/Web/JavaScript/Reference/Global_Objects/String/match
But logging `typeof result` in console shows 'object', as usual ...
+ 2
Ipang As you already know all arrays are objects...
I would suggest using the Array method join since match returns an array.
+ 2
Your Mom
adding keyboard events:
https://openjavascript.info/2022/03/04/adding-keyboard-input-event-in-javascript/
0
u know ctrl + f? pretty much that. anyways how do i make it so when u backspace it gets rid of what u put?