Created
March 3, 2020 07:37
-
-
Save coderwurst/2dab3d8ceffc1d905fc9eb4d6197bbae 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
// see all console functions | |
console.log(console); | |
// 1 view data as table console.table(data, columnNames) | |
const array = [1, 2, 3, 4, 5]; | |
const object = { | |
name: "Leira", | |
lastName: "Sánchez", | |
twitter: "MechEngSanchez", | |
}; | |
console.table(array) | |
console.table(object); | |
// 2 count to determine how many times a method has been called | |
let dev = ''; | |
const followMe = (dev) => { | |
console.count('followers'); | |
return `${dev} is following you`; | |
} | |
followMe('John'); // followers: 1 | |
followMe('Karen'); // followers: 2 | |
followMe('Camila'); // followers: 3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment