js loop array
var colors = ["red","blue","green"];
for (var i = 0; i < colors.length; i++) {
console.log(colors[i]);
}
js loop array
var colors = ["red","blue","green"];
for (var i = 0; i < colors.length; i++) {
console.log(colors[i]);
}
javascript loop array
+-------------------------------+----------------+---------------------+---------------------+---------------------+--------+-------------+
| Action | Condition | AspectRatioDragging | Dragging | Shape | Simple | Selected |
+-------------------------------+----------------+---------------------+---------------------+---------------------+--------+-------------+
| Shift Released | | ? ? ? | | | | |
| Shift Pressed | | | AspectRatioDragging | | | |
| Primary Mouse Button Pressed | Shift Key Held | | | ? ? ? | | |
| Primary Mouse Button Pressed | | | | DraggingState | | |
| Primary Mouse Button Released | ? ? | SelectedState | SelectedState | | | |
| Primary Mouse Button Released | | ShapeState | ? ? ? | | | |
| Escape Key | | ? ? ? | SimpleState | SimpleState | | ? ? ? |
| Ctrl + D & Clicking Outside | | | | | | ? ? ? |
+-------------------------------+----------------+---------------------+---------------------+---------------------+--------+-------------+
javascript loop array
function filteredArray(arr, elem) {
let newArr = [];
// change code below this line
for (let i = 0; i < arr.length; i++) {
if (arr[i].indexOf(elem) == -1) {
//Checks every parameter for the element and if is NOT there continues the code
newArr.push(arr[i]); //Inserts the element of the array in the new filtered array
}
}
// change code above this line
return newArr;
}
// change code here to test different cases:
console.log(filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3));
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us