{ questionnaireSteps.contactUs && (<StepOneForm
statusStepOneForm={(value) => {setQuestionnaireSteps({...questionnaireSteps, contactUs: value}); console.log(value)}}
statusSmsPhone={(value) => setQuestionnaireSteps({...questionnaireSteps, phoneNumberVerification: value})}
phoneNumber={setPhoneNumber}
/>)}const myFunc = (type, value) => {
console.log(value)
if(type === 'step') setQuestionnaireSteps({...questionnaireSteps, contactUs: value});
if(type === 'sms') (value) => setQuestionnaireSteps({...questionnaireSteps, phoneNumberVerification: value})
};
{ questionnaireSteps.contactUs && (<StepOneForm
statusStepOneForm={value => myFunc('step', value)}
statusSmsPhone={value => myFunc('sms', value)}
phoneNumber={setPhoneNumber}
/>)}<input type="text" id='text'>
<p id='showText'></p>function show_input_info(input, el) {
document.querySelector(input).addEventListener('input', e => {
document.querySelector(el).innerText = e.target.value;
});
}
show_input_info('#text', '#showText'); const presidents = [
{ first: 'George', last: 'Washington', born: 1732, died: 1799 },
{ first: 'John', last: 'Adams', born: 1735, died: 1826 },
{ first: 'Ronald', last: 'Reagan', born: 1911, died: 2004 },
];
let presidentsMap = presidents.map(item => ({first: item.first, last: item.last}));
console.log(presidentsMap) const candidate = ['Jimmy', 'Rayn', 'Jack', 'Vladimir', 'joen', ];
const friend = candidate.filter(item => item[0].match(/J/i))
console.log(friend) pc.createOffer({offerToReceiveVideo: true}); <div class="list">
<ul class="list__items current-list">
<li class="item">Egg - food</li>
<li class="item">Dog - animal</li>
<li class="item">Cat - animal</li>
<li class="item">Bread - food</li>
</ul>
<ul class="list__items new-list">
<!-- animal - список -->
</ul>
</div>document.querySelector('.new-list').innerHTML = [...document.querySelectorAll('.current-list li')].map(el => {
if(el.innerText.indexOf('animal') > -1) return `<li class="item">${el.innerText}</li>`;
}).join('');