| Key/Command | Description |
|---|---|
| Tab | Auto-complete files and folder names |
| Ctrl + A | Go to the beginning of the line you are currently typing on |
| Ctrl + E | Go to the end of the line you are currently typing on |
| Ctrl + U | Clear the line before the cursor |
| Ctrl + K | Clear the line after the cursor |
| Ctrl + W | Delete the word before the cursor |
| Ctrl + T | Swap the last two characters before the cursor |
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
| #take array of items, use hash table to look up prices and return prices as a float | |
| def get_amount(items) | |
| total = 0.00 | |
| prices = { | |
| "taco" => 6.00, | |
| "burrito" => 7.00, | |
| "coke" => 1.25, | |
| "iced" => 1.50 | |
| } |
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 arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY']; | |
| let arr2; | |
| (function() { | |
| "use strict"; | |
| arr2 =[...arr1] ; // here you go. | |
| console.log(arr2); | |
| })(); | |
| console.log(arr2); |
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 realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34]; | |
| const squareList = (arr) => { | |
| "use strict"; | |
| // change code below this line | |
| const squaredIntegers = | |
| arr.filter((number) =>{ | |
| if (number % 1 === 0 && number > 0){ | |
| return number; | |
| } |
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
| var category = eatsPlants && eatsAnimals ? "omnivore" : eatsPlants ? "herbivore" : eatsAnimals ? "carnivore" : undefined; |
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 palindrome(str) { | |
| console.log(str); | |
| var strLowerStripped = str.toLowerCase().replace(/[^a-zA-Z0-9]+/g,''); | |
| //split the string into an array | |
| var splitString = strLowerStripped.split(""); | |
| //reverse the string | |
| splitString.reverse(); | |
| //join the arry back together | |
| var joinArray = splitString.join(""); | |
| console.log(joinArray); |
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 menu = { | |
| _courses: { | |
| _appetizers: [], | |
| _mains: [], | |
| _desserts: [], | |
| get appetizers() { | |
| return this._appetizers; | |
| }, | |
| set appetizer(appetizersIn) { |
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
| <html lang="en"> | |
| <head> | |
| <title>Joe Horn Portfolio</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <script src="https://use.fontawesome.com/0b9b403b99.js"></script> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css"> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script> |