This file contains hidden or 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
| ///////////////// | |
| // // | |
| // CHALLENGE 1 // | |
| // // | |
| ///////////////// | |
| /* <<<=== Add two slashes to start (// /*), then remove the first two slashes (//) to comment out this challenge when finished | |
| console.log('Start of Challenge 1'); | |
| // ...your code below |
This file contains hidden or 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
| { | |
| "presets": [ | |
| "react", | |
| "es2015" | |
| [ | |
| "env", | |
| { | |
| "targets": { | |
| "browsers": "last 2 versions" | |
| }, |
This file contains hidden or 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
Show hidden characters
| { | |
| "extends": [ | |
| "airbnb", | |
| "prettier", | |
| "prettier/react" | |
| ], | |
| "plugins": [ | |
| "prettier" | |
| ], | |
| "parserOptions": { |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| </head> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>svideo</title> | |
| </head> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| </head> |
This file contains hidden or 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
| const MyTitle = function () { | |
| return ( | |
| React.createElement('div', null, | |
| React.createElement('h1',null, 'My second component') | |
| ) | |
| ) | |
| } |
This file contains hidden or 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
| <script> | |
| const MyFirstComponent = function () { | |
| return React.createElement('div', null, | |
| React.createElement('h1', null, "This is my first component! (>'-')> <('-'<) ^('-')^ v('-')v") | |
| ) | |
| } | |
| ReactDOM.render( | |
| React.createElement(MyFirstComponent), | |
| document.getElementById('app') |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>Complements</title> | |
| </head> | |
| <body> | |
| <h1>Complements!</h1> | |
| <p class="complement">none loaded yet</p> |
This file contains hidden or 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
| function binarySearch(list, item) { | |
| var min = 0; | |
| var max = list.length - 1; | |
| var guess; | |
| while (min <= max) { | |
| guess = Math.floor((min+max)/2); | |
| if (list[guess] === item) { | |
| return guess; |