'Complete function is not working in subscribe function

I am newbie at rxjs.
I think, in my code, complete function is not working.
(My node version is v12.16.3)

const { interval } = require('../../rxjs.js'); // I used CDN
const { take } = require('../../rxjs.js');     // I used CDN

interval(1000)
  .pipe(
    take(5)
  )
  .subscribe(
    res => console.log('>', res),
    err => console.log(err),
    _ => console.log("COMPLETE")
  );

My result is this.

> 0
> 1
> 2
> 3
> 4

But I think result should be this.

> 0
> 1
> 2
> 3
> 4
COMPLETE

In my result, there is no COMPLETE.
But I set the complete function in subscribe function as parameter.
Anyone know this??



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source