en.javascript.info/2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/task.md
Ilya Kantor 508969c13f up
2017-02-28 12:54:48 +03:00

348 B

importance: 5


Select all diagonal cells

Write the code to paint all diagonal table cells in red.

You'll need to get all diagonal <td> from the <table> and paint them using the code:

// td should be the reference to the table cell
td.style.backgroundColor = 'red';

The result should be:

[iframe src="solution" height=180]