Answer the question
In order to leave comments, you need to log in
What extension for Visual studio code is responsible for auto-completion of tags?
I'm a beginner, I learned to write markup in sublime text 3 and it's very convenient when you just start writing a tag, it not only closes it automatically, but also inserts attributes, for example, for the < a > tag, it immediately inserted href. In VS Code, I found only the maximum automatic exposure of the closing tag. Can you please suggest an extension or setting to make it work in VS code as well.
Answer the question
In order to leave comments, you need to log in
array1.filter(n => !array2.find(m => m.name === n.name))
Variant of @pterodaktil
let merged = [...array1, ...array2].map(i => i.name);
if (new Set(merged).size === merged.length/2) {
// равны
} else {
// не равны
}
if (JSON.stringify(obj1) === JSON.stringify(obj2)) {
// равны
} else {
// не равны
}
It is important to understand what kind of differences you are interested in? You can write a whole function with a bunch of checks for array lengths, object structure, object order, so it's not clear what exactly you want to get. If it's just equality, then the easiest way to convert them to strings is with JSON.stringify
function isEqual(arr1, arr2) {
return JSON.stringify(arr1) === JSON.stringify(arr2);
}
Read emmet's doc. You can do amazing things with it to help automate your routine.
https://code.visualstudio.com/docs/editor/emmet
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question