Quick actions

cmd+k|ctrl+k

Navigation

Languages

Array

Snippet info

Language

JavaScript

Visibility

public

Author

hltse59

Created

2026-01-22T06:40:48.506303Z

Updated

2026-01-22T06:40:54.328954Z

let numlist = [1,2,3,4,5,6];
let result = Array.from(numlist, x =>x * x);
console.log(result);

let agelist = [18,18,21,16,28,31,35,38,45,52];
let above30 = agelist.findIndex(x=>x>30);
console.log("Total " + above30 + "persons over 30 years old");
INFO