Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

reg ex with filter in js

function countSmileys(arr) {
  return arr.filter(x => /^[:;][-~]?[)D]$/.test(x)).length;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: install bootstrap in react 
Javascript :: select li element with arrow keys (up and down) using javascript 
Javascript :: passportjs serializeuser 
Javascript :: string interpolation in javascript 
Javascript :: jquery select html element 
Javascript :: react testing for links 
Javascript :: jquery fadeout to fadein 
Javascript :: jquery use variable in string "without" concatenate 
Javascript :: input two decimal places javascript 
Javascript :: how check if a form date is before today javascript 
Javascript :: get minutes and seconds from youtube seconds on js 
Javascript :: remove duplicates from array in javascript 
Javascript :: npm sendgrid 
Javascript :: htpp status 
Javascript :: mocha config 
Javascript :: install specific version of npm for your project 
Javascript :: vue 3 router alias 
Javascript :: jquery datatable table header not increasing on expanding 
Javascript :: useroutematch 
Javascript :: declare an array nodejs 
Javascript :: dynamic import in reactjs 
Javascript :: javascript sleep 1 second” is a pretty common code problem that people search ;-) 
Javascript :: jquery 
Javascript :: access variable from another function javascript 
Javascript :: document.queryselector null check 
Javascript :: router in next js 
Javascript :: inverse of stringify js 
Javascript :: password meter 
Javascript :: how to find if given character in a string is uppercase or lowercase in javascript 
Javascript :: queryselectorall in jquery 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =