-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const colors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']; //PLEASE DON'T CHANGE THIS LINE! | ||
|
||
//YOU CODE GOES HERE: | ||
const singleLetters = document.querySelectorAll('span'); | ||
let color = 0; | ||
for (let singleLetter of singleLetters) { | ||
singleLetter.style.color = colors[color]; | ||
color++; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
|
||
<head> | ||
<title>Rainbow</title> | ||
<!--LEAVE THESE LINES ALONE, PLEASE! THEY MAKE THE LIVE PREVIEW WORK!--> | ||
<script src="node_modules/babel-polyfill/dist/polyfill.js" type="text/javascript"> </script> | ||
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> | ||
|
||
</head> | ||
|
||
<body> | ||
<!--DON'T TOUCH THIS FILE PLEASE!--> | ||
<h1> | ||
<span>R</span> | ||
<span>A</span> | ||
<span>I</span> | ||
<span>N</span> | ||
<span>B</span> | ||
<span>O</span> | ||
<span>W</span> | ||
</h1> | ||
</body> | ||
|
||
</html> |