What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2022-02-05 08:15:12
Loop through an array of strings in Bash
## declare an array variable declare -a arr=("element1" "element2" "element3") ## now loop through the above array for i in "${arr[@]}" do echo "$i" # or do whatever with individual element of the a... Add solution -
Javascript 2021-09-17 09:44:02
10.3.1. Function Examples
/*Let's see function syntax in action. We first consider a program that prints an array of names.*/ let names = ["Lena", "James", "Julio"]; for (let i = 0; i < names.length; i++) { console.log(names[i]); } /*Followin... Add solution