get DOM tags
2022年5月1日小于 1 分钟
get DOM tags
Question
Given a DOM tree, please return all the tag names it has.
Your function should return a unique array of tags names in lowercase, order doesn't matter.
Code
/**
* @param {HTMLElement} tree
* @return {string[]}
*/
function getTags(tree) {
// your code here
}