Answers for "filter"

1

filter

function isBigEnough(value) {
  return value >= 10
}

let filtered = [12, 5, 8, 130, 44].filter(isBigEnough)
// filtered is [12, 130, 44]
Posted by: Guest on October-31-2020
1

filter

select *
from   toys
where  toy_name ='Sir Stripypants' OR colour ='blue'
	   AND price = 6;
Posted by: Guest on June-26-2021
0

filter

df_filtered = df[(df.Price > 500000) & (df.Rooms > 3)]df_filtered.head()
Posted by: Guest on June-03-2021
0

filter

select toy_name
from   toys
where  toy_name like '%B%;
Posted by: Guest on June-26-2021
0

filter

const array = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]; 

function isPrime(num) {
  for (let i = 2; num > i; i++) {
    if (num % i == 0) {
      return false;
    }
  }
  return num > 1;
}

console.log(array.filter(isPrime)); // [2, 3, 5, 7, 11, 13]
Posted by: Guest on November-09-2020
-1

filter

select *
from   toys
where  colour in ('red','blue')
	   AND price >= 6 AND price < 14.22;
Posted by: Guest on June-26-2021
-1

filter

select toy_name
from   toys
where colour <> 'GREEN' AND price <> 6
Posted by: Guest on June-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language