This forum is now read-only. Please use our new forums! Go to forums
6/17 - I keep getting an error that myArray has fewer than three rows or columns
According to the exercise, this should be a 2D array with 3 rows and three columns. I put in the following:
var newArray = [["Row 1", "Row 2", "Row 3"], ["Col 1", "Col 2", "Col 3"]];
And got an error “It looks like newArray has fewer than three rows. If I add an extra array like so:
var newArray = [["Row 1", "Row 2", "Row 3"], ["Col 1", "Col 2", "Col 3"], ["B1", "B2", "B3"]];
now I get an error “It looks like new Array has fewer than three columns. Please help!
Answer 545bb7b07c82cad3cb0002e0
@Barry, Your code is 100% ok.
Under certain circumstances you can shoot your Browser in an inconsistent state.
Therefor it is of an advantage to know that you have 2 reset facilities:
One is the use of the F5-key which does a refresh Browser
and
Two, select© your code Then use the Reset Code button of the course-window, then paste your code back in.
P.S. Try this to get ROW, COL idear right……
var newArray = [["row 1 col 1","col 2","col 3"],
["row 2 col 1","col 2","col 3"],
["row 3 col 1","col 2","col 3"]]
console.log( newArray );
Answer 546db0008c1ccc2282000e42
var newArray = [[“row 1 col 1”,”col 2”,”col 3”], [“row 2 col 1”,”col 2”,”col 3”], [“row 3 col 1”,”col 2”,”col 3”]] console.log( newArray );
//it works just go and check
Answer 548f573476b8feee3500a0f2
var newArray = [[“x”, “y”, “z”], [“x”, “y”, “z”], [“x”, “y”, “z”]] works too
1 comments
var newArray = [[“1”, “2”, “4”], [“2”, “3”, “9”], [“2”, “3”, “7”]];
Answer 54931bc6e39efec5180058f5
Create a two-dimensional array called newArray in the editor. It should have three rows and three columns containing any data you like. Check the Hint if you need help!
It appears that this statement should say create a 3 dimensional array not a 2 dimensional. Each array is a dimension.
Answer 550924f195e378bdd1001074
var newArray = [[“1”, “2”, “4”], [“2”, “3”, “9”], [“2”, “3”, “7”]];
Jee loo apni zindageee
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments
thanks