What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2022-03-27 17:15:20
angular formgroup mark as touched
// From Angular 8/9 you can simply use this.formGroup.markAllAsTouched(); /** * For version older than Angular 8 * Marks all controls in a form group as touched * @param formGroup - The form group to touch */ private markFormGroupTouched(formGroup:... Add solution -
Java 2022-03-24 17:40:08
java map foreach
Map<String, Integer> items = new HashMap<>(); items.put("A", 10); items.put("B", 20); items.put("C", 30); items.put("D", 40); items.put("E", 50); items.put("F", 60); items.forEach((k... Add solution -
Other 2022-03-19 13:10:05
javascript loop an array
let array = ['Item 1', 'Item 2', 'Item 3']; // Here's 4 different ways for (let index = 0; index < array.length; index++) { console.log(array[index]); } for (let index in array) { console.log(array[index]); } for (let value of array) { console... Add solution -
Javascript 2022-03-17 01:45:19
for array javascript
let array = ['Item 1', 'Item 2', 'Item 3']; // Here's 4 different ways for (let index = 0; index < array.length; index++) { console.log(array[index]); } for (let index in array) { console.log(array[index]); } for (let value of array) { console... Add solution -
Javascript 2022-03-16 22:30:12
javascript loop through arrya
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 2022-02-25 03:20:10
How to loop through objects in java using streams
ArrayList<String> namesList = new ArrayList<String>(Arrays.asList( "alex", "brian", "charles") ); namesList.forEach(name -> System.out.println(name)); Add solution -
Javascript 2022-02-22 21:25:11
iterate over node object children
/* HTML */ /* <ul class="navigation__secondary" id="navigation-bar"> <li class="navigation__secondary-item"> <span>Item</span> </li> <li class="navigation__secondary-item active&... Add solution -
Javascript 2022-02-16 18:35:08
loop through an array in 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 -
Java 2022-02-15 14:50:19
how to print the map in java
import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.stream.Stream; class MapUtil { // Program to print all keys present in the Map using keySet() in Java public... Add solution
Best helpers
Piquet
+5
J. Marks
+5
Jim Mourgos
+5
Babak
+5
TheShade
+5
Waldrumpus
+5
Arnav Bose
+5
Mostafa 36a2
+5