Front-end developer & Community Manager
console.time('timerSample');
this.longTimeMethod().then(_ => {
console.timeEnd('timerSample');
});
console.profile('profileSample');
this.longTimeMethod().then(_ => {
console.profileEnd('profileSample');
});
console.table([{a:1, b:2, c:3}, {a:"foo", b:false, c:undefined}]);
console.table([[1,2,3], [2,3,4]]);
function Person(firstName, lastName, age) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
}
console.table({
mother: new Person("Susan", "Doyle", 32),
father: new Person("John", "Doyle", 33),
daughter: new Person("Lily", "Doyle", 5),
}, ["firstName", "lastName", "age"]);
console.group('A group label');
console.log('a log under the group');
console.info('a second log');
console.groupEnd()
console.table([
{first: 'John', last: 'Doe', age: 25},
{first: 'Jane', last: 'Doe', age: 25},
{first: 'Jean-François', last: 'Garreau', age: 34},
{first: 'Julien', last: 'Landure', age: 34}])
.filter((person) => person.age > 30)
.map((person) => {
return{ name: `${person.firstName} ${person.lastName}`}
});
Merci
Jean-François Garreau
GDG Nantes Leader & Ingénieur Lucca
@jefbinomed
Dinosoft Labs / Lemon Liu / Souvik Maity / Gonzalo Bravo / Miguel C Balandrano