
Изучите основы Web Assembly за 100 секунд, а затем создайте свой первый двоичный файл WASM с помощью AssemblyScript.
📺 YouTube
#видео
Size: a a a
const arr = [1, 2, 3, 4, 5, 6];▍filter(): возвращает массив с теми элементами, в которых переданная функция возвращает true.
const mapped = arr.map(el => el + 20);
console.log(mapped);
// [21, 22, 23, 24, 25, 26]
const arr = [1, 2, 3, 4, 5, 6];Пример reduce и следующую группу рассмотрим в следующей части.
const filtered = arr.filter(el => el === 2 || el === 4);
console.log(filtered);
// [2, 4]
const arr = [1, 2, 3, 4, 5, 6];Продолжение следует...
const reduced = arr.reduce((total, current) => total + current);
console.log(reduced);
// 21