Created
May 12, 2023 16:39
-
-
Save suhailgupta03/ec5f7ceca1731768b9d17c0b8d7c1b48 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var topNStudents = [ | |
'manoj', | |
'ramesh', | |
'garima', | |
'ashish', | |
'saru', | |
'tanya' | |
]; | |
console.log(topNStudents[1]); // Accessing the first index or the second entry | |
topNStudents.push('sagar'); // this basically | |
// creates one more entry into array | |
console.log(topNStudents); | |
topNStudents.pop(); // remove the last entry | |
console.log(topNStudents) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment