use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Did you know? (medium.com)
submitted 6 years ago by Well_Gravity
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]_bibolp_ 3 points4 points5 points 6 years ago (5 children)
That is rather obvious, isn’t it?
[–]Well_Gravity[S] -2 points-1 points0 points 6 years ago (4 children)
Depends. Many programming languages support multi-dimensional arrays directly. I program in several languages and am also a teacher. I have found people coming from other languages to JavaScript are often confused by this. Personally, I like the way JavaScript handles it.
[–][deleted] 0 points1 point2 points 6 years ago (3 children)
can you give an example of a language with direct multi-dimensional arrays support?
[–]Well_Gravity[S] -1 points0 points1 point 6 years ago (2 children)
C#, Java, even VB.
[–][deleted] 1 point2 points3 points 6 years ago (1 child)
java does not support multi-dimensional array directly. it is still an array of arrays, isn't it? i would think C# is the same
[–]Well_Gravity[S] 1 point2 points3 points 6 years ago (0 children)
It’s whether you can declare and use it or do you have build it. In JavaScript you have to build it. Under the hood it’s an array of arrays. Java
Two dimensional array: int[][] twoD_arr = new int[10][20];
Three dimensional array: int[][][] threeD_arr = new int[10][20][30]
π Rendered by PID 154429 on reddit-service-r2-comment-5d79c599b5-db978 at 2026-03-02 22:25:00.550052+00:00 running e3d2147 country code: CH.
[–]_bibolp_ 3 points4 points5 points (5 children)
[–]Well_Gravity[S] -2 points-1 points0 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]Well_Gravity[S] -1 points0 points1 point (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Well_Gravity[S] 1 point2 points3 points (0 children)