Quantcast
Channel: Latest Questions by hardmode2236
Viewing all articles
Browse latest Browse all 112

Dictionary.TryGetValue for js

$
0
0
I'm trying to use a dictionary's TryGetValue in js, but i would need to pass a variable by reference. though it seems js cant use 'ref' or 'out' to pass by reference. line in questions is like this: var containerChunk : Chunk; chunks.TryGetValue(pos, containerChunk); i know js does alot of things automatically, but is that containerChunk var being passed by ref automatically by any chance? or do i need to break this line down like: if(chunks.ContainsKey(pos)) { containerChunk = chunks[pos]; } or is there some way to pass by ref in js that i don't know about?

Viewing all articles
Browse latest Browse all 112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>