0
[SOLVED] How do i separate letter and number in js
so i want to make something like this first we need an input the input is, "test12345" and i need a js code that can separate it to letter and number with the result of the code is L is for letter N is for Number so it will be like this L = test N = 12345 then console.log("Letter: " +L) console.log("Letter: " +N) help me please.. ive been try this for more than 1 day and i still dont know how to make it :') https://code.sololearn.com/WF2u85l6HEfb/?ref=app https://code.sololearn.com/WF2u85l6HEfb/?ref=app
4 Answers
+ 7
I just found this on Stackoverflow:
https://stackoverflow.com/questions/37873276/separate-characters-and-numbers-from-a-string
There are approaches using regular expressions as well as some that use simpler string methods.
+ 5
You don't actually have anything in JavaScript. Can you write something? Maybe we can see what you're trying and can guide you to the solution instead of simply giving you an answer.
+ 1
Lisa wow thats what i looking for! Thanks for ur answer... and also the other... thank you all ^_^