JavaScript Taskbook Level 8.6
Given a paragraph with text and a button. By clicking on the button, paint each symbol a random color so that adjacent symbols have different colors.
Given a paragraph with words and input. A word is entered into the input. By clicking on the button, find this word in the paragraph and paint it red.
Given a menu with links, color the link red if its address matches the URL from the browser address bar.
Display the following pyramid on the screen:
xxxxx
xxxx
xxx
xx
x
xxxx
xxx
xx
x
Given a list of events for specific dates, stored in the following structure:
let events = [
{
date: '2019-12-29'
event: 'name1'
},
{
date: '2019-12-31'
event: 'name2'
},
{
date: '2019-12-29'
event: 'name3'
},
{
date: '2019-12-30'
event: 'name4'
},
{
date: '2019-12-29'
event: 'name5'
},
{
date: '2019-12-31'
event: 'name6'
},
{
date: '2019-12-29'
event: 'name7'
},
{
date: '2019-12-30'
event: 'name8'
},
{
date: '2019-12-30'
event: 'name9'
},
]
Write code that will remake the data structure into this:
{
'2019-12-29': ['name1', 'name3', 'name5', 'name7'],
'2019-12-30': ['name4', 'name8', 'name9'],
'2019-12-31': ['name2', 'name6'],
}