Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created April 21, 2018 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dance2die/46fba8b00962893de1b8976d7d1d32b0 to your computer and use it in GitHub Desktop.
Save dance2die/46fba8b00962893de1b8976d7d1d32b0 to your computer and use it in GitHub Desktop.
function repeatDemo() {
const texts = Array(5)
.fill()
.map(_ => "I love your smile");
texts.map(text => WriteLine(text));
}
@Sylvain2703
Copy link

Sylvain2703 commented Jun 15, 2021

Thanks for your great blog post.

This demo can be a little bit improved:

const texts = Array(5)
  .fill("I love your smile");

@dance2die
Copy link
Author

Thanks for your great blog post.

This demo can be a little bit improved:

const texts = Array(5)
  .fill("I love your smile");

Yw! and wow 😮 that's much better! ty for sharing~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment