> node .\parser.test.js
{ Error: socket hang up
at createHangUpError (_http_client.js:345:15)
at TLSSocket.socketOnEnd (_http_client.js:437:23)
at emitNone (events.js:110:20)
at TLSSocket.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9) code: 'ECONNRESET' }
var prods = [
{
"id":"1",
"name": "Огурец"
},
{
"id":"2",
"name": "Помидор"
}
];
var rec =
{
"id":"1",
"name": "Salat1",
"recipe":["1","3","5"]
}
rec['recipe'].forEach(el => {
prods.forEach(prod => {
if(prod.id === el) console.log(prod.name);
})
})
var text = '';
var bufer = (function(...piece) {
return (text += piece);
})('Замыкания');
function(piece) {
if (arguments.length == 0) {
return text;
}
text += piece;
};
Если надо найти 3 слова с длиной из 14 букв
Ожидаемый результат:
недоверчивость
истрепанная
фланелевое