├── .replit ├── classes └── fightingGame │ ├── exercise │ ├── index.html │ ├── script.js │ └── style.css │ └── solution │ ├── index.html │ ├── solution.js │ └── style.css ├── dom └── red-yellow-green │ ├── index.html │ └── script.js ├── exercises ├── arraysorting.js ├── converthourstoseconds.js ├── daysinamonth.js ├── findMax.js ├── palindromechecker.js └── savingsstrategy.js ├── functions └── sum │ ├── exercise │ ├── index.html │ └── script.js │ └── solution │ ├── index.html │ └── script.js ├── index.html ├── notes ├── arrays.js ├── baby-capstone.js ├── conditions.js ├── console-log.js ├── functions.js ├── mini-weather-app.js ├── objects.js ├── redBlueGreenSquares.js ├── tip-calculator.js └── variables.js ├── playground.js ├── projects ├── fetchmovies │ └── solution │ │ ├── index.html │ │ ├── script.js │ │ └── style.css ├── rockpaperscissors │ ├── exercise │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ └── solution │ │ ├── index.html │ │ ├── script.js │ │ └── style.css ├── stopwatch │ ├── exercise │ │ ├── index.html │ │ ├── script.js │ │ └── style.css │ └── solution │ │ ├── index.html │ │ ├── script.js │ │ └── style.css └── tip-calculator │ ├── exercise │ ├── index.html │ ├── script.js │ └── style.css │ └── solution │ ├── index.html │ ├── script.js │ └── style.css ├── replit.nix ├── style.css └── yourPlayground.js /.replit: -------------------------------------------------------------------------------- 1 | hidden=[".config"] 2 | 3 | # hosting is currently hardcoded for this language 4 | # [hosting] 5 | # route = "/" 6 | # directory= "/" 7 | 8 | [nix] 9 | channel = "stable-21_11" 10 | 11 | [languages.html] 12 | pattern = "**/*.html" 13 | [languages.html.languageServer] 14 | start = ["vscode-html-language-server", "--stdio"] 15 | [languages.html.languageServer.initializationOptions] 16 | provideFormatter = true 17 | [languages.html.languageServer.configuration.html] 18 | customData = [ ] 19 | autoCreateQuotes = true 20 | autoClosingTags = true 21 | mirrorCursorOnMatchingTag = false 22 | 23 | [languages.html.languageServer.configuration.html.completion] 24 | attributeDefaultValue = "doublequotes" 25 | 26 | [languages.html.languageServer.configuration.html.format] 27 | enable = true 28 | wrapLineLength = 120 29 | unformatted = "wbr" 30 | contentUnformatted = "pre,code,textarea" 31 | indentInnerHtml = false 32 | preserveNewLines = true 33 | indentHandlebars = false 34 | endWithNewline = false 35 | extraLiners = "head, body, /html" 36 | wrapAttributes = "auto" 37 | templating = false 38 | unformattedContentDelimiter = "" 39 | 40 | [languages.html.languageServer.configuration.html.suggest] 41 | html5 = true 42 | 43 | [languages.html.languageServer.configuration.html.validate] 44 | scripts = true 45 | styles = true 46 | 47 | [languages.html.languageServer.configuration.html.hover] 48 | documentation = true 49 | references = true 50 | 51 | [languages.html.languageServer.configuration.html.trace] 52 | server = "off" 53 | 54 | [languages.javascript] 55 | pattern = "**/{*.js,*.jsx,*.ts,*.tsx,*.mjs,*.cjs}" 56 | [languages.javascript.languageServer] 57 | start = ["typescript-language-server", "--stdio"] 58 | 59 | # TODO autocomplete relies on snippet support, which we don't advertise to LSP servers. 60 | # For now CSS autocomplete will use built-in codemirror, which is not perfect but good enough 61 | [languages.css] 62 | pattern = "**/{*.less,*.scss,*.css}" 63 | [languages.css.languageServer] 64 | start = ["vscode-css-language-server", "--stdio"] 65 | [languages.css.languageServer.configuration.css] 66 | customData = [ ] 67 | validate = true 68 | 69 | [languages.css.languageServer.configuration.css.completion] 70 | triggerPropertyValueCompletion = true 71 | completePropertyWithSemicolon = true 72 | 73 | [languages.css.languageServer.configuration.css.hover] 74 | documentation = true 75 | references = true 76 | 77 | [languages.css.languageServer.configuration.css.lint] 78 | # Configure linting 79 | # ignore = don't show any warning or error 80 | # warning = show yellow underline 81 | # error = show red underline 82 | argumentsInColorFunction = "error" # Invalid number of parameters 83 | boxModel = "ignore" # Do not use width or height when using padding or border 84 | compatibleVendorPrefixes = "ignore" # When using a vendor-specific prefix make sure to also include all other vendor-specific properties" 85 | duplicateProperties = "warning" # Do not use duplicate style definitions 86 | emptyRules = "warning" # Do not use empty rulesets 87 | float = "ignore" # Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. 88 | fontFaceProperties = "warning" # @font-face rule must define 'src' and 'font-family' properties 89 | hexColorLength = "error" # Hex colors must consist of three, four, six or eight hex numbers 90 | idSelector = "ignore" # Selectors should not contain IDs because these rules are too tightly coupled with the HTML. 91 | ieHack = "ignore" # IE hacks are only necessary when supporting IE7 and older 92 | important = "ignore" # Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. 93 | importStatement = "ignore" # Import statements do not load in parallel 94 | propertyIgnoredDueToDisplay = "warning" # Property is ignored due to the display 95 | universalSelector = "ignore" # The universal selector (*) is known to be slow 96 | unknownAtRules = "warning" # Unknown at-rule 97 | unknownProperties = "warning" # Unknown property. 98 | validProperties = [ ] # add some properties that the linter doesn't know about 99 | unknownVendorSpecificProperties = "ignore" # Unknown vendor specific property. 100 | vendorPrefix = "warning" # When using a vendor-specific prefix also include the standard property 101 | zeroUnits = "ignore" # No unit for zero needed 102 | 103 | [languages.css.languageServer.configuration.css.trace] 104 | server = "off" 105 | 106 | [languages.css.languageServer.configuration.scss] 107 | validate = true 108 | 109 | [languages.css.languageServer.configuration.scss.completion] 110 | triggerPropertyValueCompletion = true 111 | completePropertyWithSemicolon = true 112 | 113 | [languages.css.languageServer.configuration.scss.hover] 114 | documentation = true 115 | references = true 116 | 117 | [languages.css.languageServer.configuration.scss.lint] 118 | # Configure linting 119 | # ignore = don't show any warning or error 120 | # warning = show yellow underline 121 | # error = show red underline 122 | argumentsInColorFunction = "error" # Invalid number of parameters 123 | boxModel = "ignore" # Do not use width or height when using padding or border 124 | compatibleVendorPrefixes = "ignore" # When using a vendor-specific prefix make sure to also include all other vendor-specific properties" 125 | duplicateProperties = "warning" # Do not use duplicate style definitions 126 | emptyRules = "warning" # Do not use empty rulesets 127 | float = "ignore" # Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. 128 | fontFaceProperties = "warning" # @font-face rule must define 'src' and 'font-family' properties 129 | hexColorLength = "error" # Hex colors must consist of three, four, six or eight hex numbers 130 | idSelector = "ignore" # Selectors should not contain IDs because these rules are too tightly coupled with the HTML. 131 | ieHack = "ignore" # IE hacks are only necessary when supporting IE7 and older 132 | important = "ignore" # Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. 133 | importStatement = "ignore" # Import statements do not load in parallel 134 | propertyIgnoredDueToDisplay = "warning" # Property is ignored due to the display 135 | universalSelector = "ignore" # The universal selector (*) is known to be slow 136 | unknownAtRules = "warning" # Unknown at-rule 137 | unknownProperties = "warning" # Unknown property. 138 | validProperties = [ ] # add some properties that the linter doesn't know about 139 | unknownVendorSpecificProperties = "ignore" # Unknown vendor specific property. 140 | vendorPrefix = "warning" # When using a vendor-specific prefix also include the standard property 141 | zeroUnits = "ignore" # No unit for zero needed" 142 | 143 | [languages.css.languageServer.configuration.less] 144 | validate = true 145 | 146 | [languages.css.languageServer.configuration.less.completion] 147 | triggerPropertyValueCompletion = true 148 | completePropertyWithSemicolon = true 149 | 150 | [languages.css.languageServer.configuration.less.hover] 151 | documentation = true 152 | references = true 153 | 154 | [languages.css.languageServer.configuration.less.lint] 155 | # Configure linting 156 | # ignore = don't show any warning or error 157 | # warning = show yellow underline 158 | # error = show red underline 159 | argumentsInColorFunction = "error" # Invalid number of parameters 160 | boxModel = "ignore" # Do not use width or height when using padding or border 161 | compatibleVendorPrefixes = "ignore" # When using a vendor-specific prefix make sure to also include all other vendor-specific properties" 162 | duplicateProperties = "warning" # Do not use duplicate style definitions 163 | emptyRules = "warning" # Do not use empty rulesets 164 | float = "ignore" # Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. 165 | fontFaceProperties = "warning" # @font-face rule must define 'src' and 'font-family' properties 166 | hexColorLength = "error" # Hex colors must consist of three, four, six or eight hex numbers 167 | idSelector = "ignore" # Selectors should not contain IDs because these rules are too tightly coupled with the HTML. 168 | ieHack = "ignore" # IE hacks are only necessary when supporting IE7 and older 169 | important = "ignore" # Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. 170 | importStatement = "ignore" # Import statements do not load in parallel 171 | propertyIgnoredDueToDisplay = "warning" # Property is ignored due to the display 172 | universalSelector = "ignore" # The universal selector (*) is known to be slow 173 | unknownAtRules = "warning" # Unknown at-rule 174 | unknownProperties = "warning" # Unknown property. 175 | validProperties = [ ] # add some properties that the linter doesn't know about 176 | unknownVendorSpecificProperties = "ignore" # Unknown vendor specific property. 177 | vendorPrefix = "warning" # When using a vendor-specific prefix also include the standard property 178 | zeroUnits = "ignore" # No unit for zero needed" 179 | -------------------------------------------------------------------------------- /classes/fightingGame/exercise/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 |${message}
` 14 | 15 | titleDiv.style.backgroundColor = 'blue' 16 | 17 | const squares = document.querySelectorAll('.colorSquare') 18 | 19 | // forEach 20 | const timesClicked = {'red': 0, 'yellow': 0, 'green': 0} 21 | squares.forEach(square => { 22 | square.onclick = () => { 23 | timesClicked[square.value] += 1 24 | square.innerText = timesClicked[square.value] 25 | } 26 | }) 27 | function clearScores() { 28 | timesClicked.red = 0 29 | timesClicked.yellow = 0 30 | timesClicked.green = 0 31 | squares.forEach(square => { 32 | square.innerText = '' 33 | }) 34 | } 35 | 36 | const clearGameBtn = document.getElementById('clear-game') 37 | clearGameBtn.onclick = () => clearScores() 38 | 39 | -------------------------------------------------------------------------------- /exercises/arraysorting.js: -------------------------------------------------------------------------------- 1 | // Write a function that takes in an array and sort the numbers inside from least to greatest 2 | 3 | function sortArray (array) { 4 | 5 | } 6 | 7 | // BONUS sort the array without using .sort() 8 | 9 | -------------------------------------------------------------------------------- /exercises/converthourstoseconds.js: -------------------------------------------------------------------------------- 1 | // Test you code by forking this repl: 2 | // 👉 https://replit.com/@CleverLance/ConvertHoursToSeconds#solution.js 3 | 4 | // https://www.loom.com/share/3de1aa5d007047ef82652530f04600b1 5 | 6 | // Write a function that takes a parameter (hours) and converts 7 | // it to seconds 8 | 9 | function howManySeconds(hours) { 10 | // Your function should return an integer 11 | // of how many seconds are in the hour 12 | } 13 | 14 | //Topics: Variables,functions, Math 15 | 16 | -------------------------------------------------------------------------------- /exercises/daysinamonth.js: -------------------------------------------------------------------------------- 1 | // Create a function that takes the month and year (as integers) 2 | // and returns the number of DAYS in that month 3 | 4 | // Hints: 5 | // Don't forget about leap year! 6 | // Keep in mind which month has 30 days, 31 days, and 28 days 7 | // Use everything you learned to get to the answer 8 | 9 | const daysInMonth = (month,year) => { 10 | 11 | } 12 | 13 | // Example: 14 | // daysInMonth(2,2018) -> 28 15 | // days(4,654) -> 30 16 | // days(2,2020) -> 29 -------------------------------------------------------------------------------- /exercises/findMax.js: -------------------------------------------------------------------------------- 1 | // Write a function that takes in an array of numbers and returns the largest number 2 | 3 | function findMax (array) { 4 | 5 | } 6 | 7 | //Topics: loops, arrays, conditions, -------------------------------------------------------------------------------- /exercises/palindromechecker.js: -------------------------------------------------------------------------------- 1 | // Write a function that takes in string and checks if it is a Palindrome 2 | // A palindrome is a word that is the same forwards and backwards! 3 | // Ex: racecar -> racecar 4 | 5 | function isPalindrome (string) { 6 | // Should return true IF it's a palindrome 7 | } 8 | 9 | 10 | //Topics: Strings, loops -------------------------------------------------------------------------------- /exercises/savingsstrategy.js: -------------------------------------------------------------------------------- 1 | // The 50-30-20 strategy is a simple way to budget 2 | // which involves spending 50% of after-tax income on needs, 3 | // 30% after tax income on wants, 4 | // 20% after-tax income on savings or paying off debt. 5 | 6 | // Create a function that takes an income amount and return an OBJECT with what they have for needs, wants, and savings 7 | 8 | function savingsStrategy (income) { 9 | 10 | } 11 | 12 | // Ex: 13 | // Input: fiftyThirtyTwenty(10000) 14 | // Output: { "Needs": 5000, "Wants": 3000, "Savings": 2000 } 15 | 16 | 17 | //Topics: Objects -------------------------------------------------------------------------------- /functions/sum/exercise/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |