Arrays

Run Settings
LanguageJavaScript
Language Version
Run Command
console.log([1, 2 ,3, 4, 5].map(item => item*2)); let arr1 = [1, 2, 3, 4, 5, 6, 7, 8]; let arr2 = [3, 1, 8]; let arr = arr1.filter(item => { return arr2.indexOf(item) === -1; }); console.log(arr);
const a = { users: ['1', '2'], label: 'test' }; let new1 = ['new1', 'ne2']; a.users = new1; new1.splice(0, 1); console.log(a);
Editor Settings
Theme
Key bindings
Full width
Lines