Answer the question
In order to leave comments, you need to log in
How to properly destructurize an object?
please tell me how to properly destructurize the object
const elements = document.forms.myForm.elements;
const artist = elements.artist;
const song = elements.song;
console log(artist);
console log(song);
thanks in advance
Answer the question
In order to leave comments, you need to log in
const elements ={
artist: "Биба",
song: "Боба"
}
const { artist, song } = elements;
console.log(artist);
console.log(song);
const {artist, song} = document.forms.myForm.elements;
console.log(artist);
console.log(song);
const { elements } = document.forms.myForm;
const { artist, song } = elements
console.log(artist);
console log(song);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question