The output I expect for "test".match(/[a-z]{0,}/g); should contain '', 't', 'e', 's', 't', 'te', 'es', 'st', etc.
However I only get '' and 'test' from the console. What’s happening here?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If what you are looking for is all word combinations, here is a code I’ve worked on:
For ‘test’, it returns ‘,t,e,s,te,st,tes,test,es,est’.