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

前端 未结 0 460
别那么骄傲
别那么骄傲 2021-02-14 10:01

I see this for generating triangular numbers in python:

from itertools import islice

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


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