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
m1 = [[1, 2, 3, 4], [4, 5, 6, 7], [7, 8, 9, 10], [15, 16, 17, 18]] | |
# write a for loop to display these numbers in this format: 1 2 3 4 5 6 7 8 9 | |
# format: 3 2 1 6 5 4 9 8 7 | |
# for..in | |
# for row in m1: | |
# for item in row: |
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
// const student = { | |
// firstName: 'John', | |
// lastName: 'Doe', | |
// age: 25, | |
// }; | |
// class Student { | |
// constructor(firstName, lastName, age, teacherName) { | |
// this.firstName = firstName; | |
// this.lastName = lastName; |
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
function Counter(startingCount) { | |
this.startingCount = startingCount; | |
this.count = this.startingCount; | |
this.increment = () => { | |
this.count = this.count + 1; | |
}; | |
this.decrement = () => { | |
this.count = this.count - 1; |
NewerOlder