![]() ![]() Var a=//if we write this syntax in Java it will shows compilation error. Can we assign an array to a variable directly in JavaScript: Yes, JavaScript allows assigning an array to a variable.Var a=new Array(new Array(elements), new Array(elements), new Array(elements),……) Multi-dimensional Array in JavaScript: Array added as an item to another array in JavaScript makes array becomes multidimensional.slice(): slice() function is used to remove the elements from an array based on the index. length: length is used to get the size of the array.ģ.
0 Comments
Leave a Reply. |