Created
January 7, 2024 01:10
-
-
Save susilolab/6baf3b832aa809787e44ed87e2335ad0 to your computer and use it in GitHub Desktop.
Tips javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generate array 1 - 10 | |
const nums = [...Array.from(10).keys()].map(x => ++x) | |
// [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
// dimulai dari 0 | |
const nums = [...Array.from(10).keys()] | |
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment