What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-09 23:47:03
loop over an array
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Javascript 2021-10-09 18:33:03
Iterate Through an Array with a For Loop
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Javascript 2021-10-09 11:34:04
js loop through array
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Javascript 2021-10-05 19:02:05
codebyte-intersection-challenge
function FindIntersection(){ //1) Grab the first and second elements to be compared let firstString = strArr[0] let secondString = strArr[1] //2) Create empty arrays to store elements, after converted from strings to numbers let firstElementArray =... Add solution -
C++ 2021-09-29 22:14:04
cpp program to find average of n numbers
#include <iostream> using namespace std; int main() { // initialize an array without specifying size double numbers[] = {7, 5, 6, 12, 35, 27}; double sum = 0; double count = 0; double average; cout << "The ... Add solution -
C 2021-09-29 07:21:03
c program to arrange numbers in descending order
/* C program to arrange numbers in descending order DescOrder.C */ #include <stdio.h> void main () { //variable declaration int number[30]; int i, j, a, n; //asking user to enter size of array printf("Enter the value of N\n"); s... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5