Last active
May 13, 2020 21:39
-
-
Save ljbatwh/39fc51e452ef5cda4195a1cf5c963045 to your computer and use it in GitHub Desktop.
create a matrix in 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
function matrix(r,c,initialValue){ | |
Array(r).fill(initialValue).map(()=>Array(c).fill(initialValue)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment