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
survey-celery-1 | INFO celery.app.trace Task VorteXplore.client_details.tasks.send_scheduled_emails[2e686f98-d867-441a-bcca-c0d792267876] succeeded in 0.010594041988952085s: None | |
survey-celery-1 | INFO celery.worker.strategy Task VorteXplore.client_details.tasks.send_scheduled_emails[0bceb30f-567c-4687-ade9-14817561783a] received | |
survey-celery-1 | INFO celery.worker.strategy Task VorteXplore.client_details.tasks.send_scheduled_emails[341b1462-f963-484a-91fe-46b7c484e98a] received | |
survey-celery-1 | INFO celery.app.trace Task VorteXplore.client_details.tasks.send_scheduled_emails[0bceb30f-567c-4687-ade9-14817561783a] succeeded in 0.021787500008940697s: None | |
survey-celery-1 | INFO celery.app.trace Task VorteXplore.client_details.tasks.send_scheduled_emails[341b1462-f963-484a-91fe-46b7c484e98a] succeeded in 0.025421999976970255s: None | |
survey-celery-1 | INFO celery.worker.strategy Task VorteXplore.client_details.tasks.send_scheduled_emails[a8d304d0-ceac-47f4-8b13-4cf348f7baef] received | |
survey-celery-1 | INF |
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
var async = require("async"); | |
var fruits = ["apple", "mango", "orange", "grapes"]; | |
const myAsyncMapping = async (fruits) => { | |
var num = 1; | |
var fruitObject = fruits.map((fruit) => { | |
// this will produce an error | |
var numberedFruit = await assignNumber(num, fruit); | |
return numberedFruit; | |
}); |
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
var fruits = ['apple', 'mango', 'orange', 'grapes']; | |
fruits.map(fruit => console.log(fruit)); | |
// apple | |
// mango | |
// orange | |
// grapes | |
var fruitJuice = fruits.map(fruit => fruit + ' juice'); | |
console.log(fruitJuice); |
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 drinks = [ | |
{name: 'coffee', price: 1.99}, | |
{name: 'tea', price: 1.75}, | |
{name: 'milk', price: 1.5}, | |
] | |
const highestPricedDrink = drinks.reduce((highestPriced, drink) => { | |
return highestPriced.price > drink.price ? highestPriced: drink; | |
}, {}); |
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 drinks = [ | |
{name: 'coffee', price: 1.99}, | |
{name: 'tea', price: 1.75}, | |
{name: 'milk', price: 1.5}, | |
]; | |
const totalPrice = drinks.reduce((total, next) => total + next.price, 0); | |
console.log(totalPrice); | |
//5.24 |
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 numbers = [1, 2, 3, 4, 5]; | |
const result = numbers.reduce((current, next) => current + next, 0); | |
console.log(result); | |
// 15 |
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 fruits = ['apple', 'orange', 'banana']; | |
const result = fruits.reduce((current, next) => current + ' ' + next, 'test '); | |
console.log(result); | |
// test apple orange banana |
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 apple = { | |
name: 'apple', | |
color: 'red', | |
size: 'medium' | |
} | |
delete apple.color; | |
console.log(apple); | |
//result: { name: 'apple', size: 'medium' } |