Explore tweets tagged as #ArrayExample
Задачка для фронтів. Видалити всі записи: які пусті (=== ''), які null та ті, що false. З цього об'єкту: const arrayExample = [ "", null, 1, 2.2, [1, 2, "a", null, ["null", "", 5.7]], false, { a: 1, b: 22, c: null, piu: "" }, ];
14
0
26
@devellloper I solved it many years ago: let f = require("supermixer")({ filter: Boolean, deep: true, }); let newArray = f(arrayExample);
2
0
0
@devellloper Власне, щоб конвертувати це в масив, можна зробити так: const output = []; for (const i of onlyTruthy(arrayExample)) { output.push(i); } Або: const output = Array.from(onlyTruthy(arrayExample));
1
0
0
@PrabeshGauli @SavvasStephnds arrayExample = [I,a,m,a,r,r,a,y,s] arrayExample.pop() console.log(arrayExample) 🤣
1
0
1
@devellloper const shouldBeRemoved = val => !val && val !==0 (якщо undefined теж треба видалити) arrayExample.forEach((e, i) => { if (shouldBeRemoved(e)) delete arrayExample[i] }) Але мені подобається без мутацій const result = arrayExample.filter(shouldRemain)
0
0
0
Array in Java with Real-Time Example : #Array #ArrayinJava #ArrayList #ArrayExample #Java #JavaEE #JavaSE #CoreJava #LearnJava #BasicJava #JavaChallenge #Programming
https://t.co/AAt3kje1wv
0
0
0
🪢2 function ➡️thats also object in js (non -data structure,reuse,callabel) 🪢3 Array ➡️thats also object in js (collection of value) ➡️const arrayExample = [2, 3, 4, 5, 6, "js", "python", { name: "dipesh" }];
1
0
0
What will be the output of this Java code snippet? public class ArrayExample { public static void main(String[] args) { int[] arr = {1, 2, 3, 4, 5}; System.out.println(arr[arr.length - 2]); } } Options: A) 4 B) 5 C) 3 D) 2
0
0
0
Java program to Print an Array: package arrayexample;import java.util.Scanner;public class ArrayExample{ pu... http://t.co/tBQf1snSEA
0
0
0
PHP - How to remove duplicate values from multidimensional array? https://t.co/w90v7Mi8uZ
#php
0
0
0
Just spent a few hours learning how to handle deletion of a value from two different sized arrays. If interested: [dl] http://t.co/Ym3uZSod
0
0
0
#JQuery - How to push specific key and value in array?
0
2
1