What do you want to save?
Add Code snippet
New code examples
-
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 -
Other 2021-10-08 11:59:07
Number of Palindromic Substrings
Recursive soln: 1. Here base condition comes out to be i>j if we hit this condition, return 1. 2. We check for each and every i and j, if the characters are equal, if that is not the case, return 0. 3. Call the is_palindrome function again with inc... Add solution -
Javascript 2021-10-06 21:16:04
react fetch data in for loop
/* ORIGINAL CODE */ videoUrls=()=>{ let i=0; let urllist=[] for(i;i< this.state.data.length;i++){ fetch(`https://www.googleapis.com/youtube/v3/search?part=snippet&q=${this.state.data[i].name}&key=xxxxxxxxxxx0`) .then(respo... Add solution -
Python 2021-10-06 09:40:03
continue python
The continue statement in Python returns the control to the beginning of the while loop. The continue statement rejects all the remaining statements in the current iteration of the loop and moves the control back to the top of the loop. The continue s... Add solution -
Other 2021-10-06 03:35:06
for vs foreach loop
1- For Loop: -It is flexible to iterate array both ascending and descending order. For Each: -It iterates from initial to end 2- For Loop: -It runs until given condition become false For Each: -Keeps execution until last element get executed 3-... Add solution -
Javascript 2021-10-03 19:29:02
settimeout inside loop
//you can leave the sleep constant const sleep = (milliseconds) => { return new Promise(resolve => setTimeout(resolve, milliseconds)) } const doSomething = async () => { for (/*for loop statements here*/) { //code before sleep goes here, j... Add solution -
VBA 2021-10-02 07:40:06
vba for next loop
For i = 1 to 100 'Code here is executed 100 times. Next ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'Notes: The For loop is terminated with the 'Next' keyword. There is no need ' to include the counter variable a... Add solution -
Python 2021-10-01 05:22:02
break while loop python
The continue statement in Python returns the control to the beginning of the while loop. The continue statement rejects all the remaining statements in the current iteration of the loop and moves the control back to the top of the loop. The continue s... Add solution
Best helpers
Zulu
+5
Calista
+5
Shivam Patel
+5
MGA
+5
Carla Walker
+5
Brad Thomas
+5
DJaye
+5
Umesh
+5
Mai0003c
+5
Pc1oad1etter
+5
Loronzo
+5
Lupa
+5
Vermilions
+5
Ian Goldby
+5
Elenaher
+5
Nerrolken
+5
OiciTrap
+5
RLHanout
+5
Hassaan
+5
JBeez
+5