Jump to content

Hash from two arrays: Difference between revisions

no edit summary
No edit summary
Line 2,564:
 
<pre>[[a; 1]; [b; 2]; [c; 3]]</pre>
 
=={{header|Vlang}}==
<lang vlang>fn main() {
keys := ["a", "b", "c"]
vals := [1, 2, 3]
mut hash := map[string]int{}
for i, key in keys {
hash[key] = vals[i]
}
println(hash)
}</lang>
{{out}}
<pre>
{'a': 1, 'b': 2, 'c': 3}
</pre>
 
=={{header|Wortel}}==
338

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.