How could you implement a large triangular number generator in JavaScript?

前端 未结 0 1049
无人及你
无人及你 2021-02-14 10:21

I see this for generating triangular numbers in python:

from itertools import islice

def triangular():
    n = 1
    i = 1
    while True:
        yield n
               


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题