Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

sort and split js alefbethic

 function splitAndSort(s){
         
         const ALPHA_REGEX = /^[a-zA-Z]+$/i

         let isAlphaWord = (word) => ALPHA_REGEX.test(word)
         let alphas = s
         .replace(/[^a-zA-Z ]/gi,"")
         .split(' ')
         .filter(isAlphaWord)   
         
         alphas = alphas.filter(w=>w.length >1)
         alphas.sort()
         return alphas 

     }
Comment

PREVIOUS NEXT
Code Example
Javascript :: codewars js Spinning Rings 
Javascript :: react native google play this device does not support 
Javascript :: default error handler express 
Javascript :: express get request origin 
Javascript :: stun server 
Javascript :: jquery add inline style 
Javascript :: check the checkbox using javascript 
Javascript :: copy text to clipboard jquery 
Javascript :: jquery on scroll down 
Javascript :: condition in string interpolation angular 
Javascript :: javscript .split().reverse.join 
Javascript :: javascript format number 
Javascript :: react native shadow 
Javascript :: js add delay 
Javascript :: react slick slider duplicate items when infinite true #1623 
Javascript :: javascript dom last child 
Javascript :: ClassNotFoundException: com.fasterxml.jackson.core.JsonGenerator 
Javascript :: js wait 5 second 
Javascript :: change value krajee star rating using jquery 
Javascript :: comment in vue js 
Javascript :: js 1d index to 2d coord 
Javascript :: router class in backbone 
Javascript :: slide right jquery 
Javascript :: javascript get clipboard contents 
Javascript :: eslint ignore current line 
Javascript :: style display block js 
Javascript :: how to use Node.js Client for Google Maps Services for geolocation 
Javascript :: jquery when any key is pressed 
Javascript :: external linking of JavaScript in html 
Javascript :: create hash password in js 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =