Message from JavaScript discussions

January 2019

— Https://pastebin.com/zZEjnjt7 this is the html

— 

And I need to find the following items with pure js:
$("ul").children().first().has("b")
$("ul").children().last().has("em")

— Can you put it into codepen.io ? it doesnt load

— Https://jsbin.com/pebanowoda/edit?html,output

— Do you need <ul> or <li>?

— I corrected the link and I entered the entire js code so you can see better

— All <li> elements that contain <b> and <em> elements

— 

a = [...(document.querySelectorAll 'ul b')]
a = a.map (node) -> node.parentNode
a = a.filter (node, index) ->
return (a.indexOf node) == index

Message permanent page

— You dont need to filter, if there may be only one <b> inside of <li>

— Just woke up🤤

— Https://codepen.io/anon/pen/EraNGK?editors=1010

— Jquery is not needed ^