function greet(name) {
return `Hello, ${name}!`;
}
function highlight(strings, ...values) {
return strings.reduce((result, str, i) => {
return result + str + (values[i] ? `<em>${values[i]}</em>` : '');
}, '');
}
const user = 'Sarah';
const status = 'online';
console.log(highlight`User ${user} is currently ${status}.`);
...Ответ:
JavaScript test | #JavaScript
Please open Telegram to view this post
VIEW IN TELEGRAM
async function foo() {
console.log('Start');
await Promise.resolve().then(() => {
console.log('Inside Promise');
});
console.log('End');
}
foo();
console.log('Outside');
Ответ:
Please open Telegram to view this post
VIEW IN TELEGRAM