Skip to content

Instantly share code, notes, and snippets.

@cvan
Last active March 24, 2020 01:16
Show Gist options
  • Select an option

  • Save cvan/8a10ea4929d5a29ac931e479ebbba6a4 to your computer and use it in GitHub Desktop.

Select an option

Save cvan/8a10ea4929d5a29ac931e479ebbba6a4 to your computer and use it in GitHub Desktop.
generate every five number from 0 through 100 (javascript for use in devtools)
str = ''; for (let i = 0 ; i <= 100 ; i += 5) { str+=` '${i}': '${i}%,'\n`; }
copy(str);
/*
Output:
'0': '0%',
'5': '5%',
'10': '10%',
'15': '15%',
'20': '20%',
'25': '25%',
'30': '30%',
'35': '35%',
'40': '40%',
'45': '45%',
'50': '50%',
'55': '55%',
'60': '60%',
'65': '65%',
'70': '70%',
'75': '75%',
'80': '80%',
'85': '85%',
'90': '90%',
'95': '95%',
'100': '100%'
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment