Can I set variables to undefined or pass undefined as an argument?

I’m a bit confused about Javascript undefined & null. null generally behaves similarly to other scripting languages’ concepts of the out-of-band ‘null’, ‘nil’ or ‘None’ objects. undefined, on the other hand, is a weird JavaScript quirk. It’s a singleton object that represents out-of-band values, essentially a second similar-but-different null. It comes up: When you call … Read more

Angular – two subscriptions in ngOnInit result in object ‘undefined’

If you want to return observables in a sequential manner, you shouldn’t nest your subscribe() methods. Instead, we should be using RxJS’s mergeMap to map over the observable values from the activatedRoute into an inner observable, which is assigned to the newsID property. Then, we call the getSectors() method from _newswireService, and the observables are … Read more

tech