Posts by Daniel Prince • 3 points
1 post
-
0
votes2
answers173
viewsQ: Typescript variable inside function allocates information outside of it it is empty
I need to take a variable within that function this.rooms.subscribe( function (x) { y= x[0].id; alert(y) }); but when access it out of function it returns to its initial value here the whole code:…
javascriptasked Daniel Prince 3