Created
November 2, 2020 14:30
-
-
Save ranamahmud/437c32e783e3bbc03086f5df667024bd to your computer and use it in GitHub Desktop.
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
// first way | |
var numbers = [1, 3, 4, 5]; | |
console.log(numbers) | |
// [1, 3, 4, 5] // output | |
// using Array Class() | |
var fruits = new Array(); | |
fruits[0] = "apple"; | |
fruits[1] = "banana"; | |
fruits[2] = "orange"; | |
console.log(fruits) | |
// ["apple", "banana", "orange"] // output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment