What do you want to save?
Add Code snippet
New code examples
-
Java 2021-09-26 10:59:05
how to loop through 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-09-25 09:29:03
loop through javascript 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 -
Other 2021-09-23 21:31:03
Intermediate Algorithm Scripting: DNA Pairing
function pairElement(str) { //define a map object with all pair possibilities var map = {T:'A', A:'T', G:'C', C:'G'}; //split str into a char Array strArr = str.split(''); //replace each Array item with a 2d Array using map for (var i=0;i<... Add solution -
Python 2021-09-12 23:23:03
how to get user input of list in python
# number of elements n = int(input("Enter number of elements : ")) # Below line read inputs from user using map() function a = list(map(int,input("\nEnter the numbers : ").strip().split()))[:n] print("\nList is - "... Add solution -
Javascript 2021-09-07 18:14:04
iterate over array javascript
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 -
TypeScript 2021-09-06 15:00:02
how to cycle through an array js
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-09-01 04:49:03
loop through an array in javascript
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-08-30 20:55:01
javascript code to 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
Best helpers
Ranking is empty