marks.push(["Riya",["Physics",93], ["Chemistry",85], ["Biology",91], ["Aeronatics",87]]);
push is intentionally generic. A case when the operator gathers the rest remained after the operation. The push method relies on a length property to determine where to start inserting the given values. The JavaScript spread operator constructs arrays or sets the function arguments on invocation from an array. var students = []; students. Although strings are native, Array-like We can declare it in two ways by using the new object or [] array.