diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..d39315a7 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,93 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Edge", + "port": 9222, + "request": "attach", + "type": "msedge", + "webRoot": "${workspaceFolder}" + }, + { + "name": "Attach to Chrome", + "port": 9222, + "request": "attach", + "type": "chrome", + "webRoot": "${workspaceFolder}" + }, + { + "name": "Launch Chrome", + "request": "launch", + "type": "chrome", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + }, + { + "name": "Attach to Chrome", + "port": 9222, + "request": "attach", + "type": "chrome", + "webRoot": "${workspaceFolder}" + }, + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + }, + { + "type": "pwa-msedge", + "name": "Launch Microsoft Edge", + "request": "launch", + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "url": "/Users/veronika/.vscode/extensions/ms-edgedevtools.vscode-edge-devtools-2.1.1/out/startpage/index.html", // Provide your project's url to finish configuring + "presentation": { + "hidden": true + } + }, + { + "type": "pwa-msedge", + "name": "Launch Microsoft Edge in headless mode", + "request": "launch", + "runtimeArgs": [ + "--headless", + "--remote-debugging-port=9222" + ], + "url": "/Users/veronika/.vscode/extensions/ms-edgedevtools.vscode-edge-devtools-2.1.1/out/startpage/index.html", // Provide your project's url to finish configuring + "presentation": { + "hidden": true + } + }, + { + "type": "vscode-edge-devtools.debug", + "name": "Open Edge DevTools", + "request": "attach", + "url": "/Users/veronika/.vscode/extensions/ms-edgedevtools.vscode-edge-devtools-2.1.1/out/startpage/index.html", // Provide your project's url to finish configuring + "presentation": { + "hidden": true + } + } + ], + "compounds": [ + { + "name": "Launch Edge Headless and attach DevTools", + "configurations": [ + "Launch Microsoft Edge in headless mode", + "Open Edge DevTools" + ] + }, + { + "name": "Launch Edge and attach DevTools", + "configurations": [ + "Launch Microsoft Edge", + "Open Edge DevTools" + ] + } + ] +} \ No newline at end of file diff --git a/1. Build a Passenger Counter App/1. Welcome to the course/index.css b/1. Build a Passenger Counter App/1. Welcome to the course/index.css index a99ee492..9bf45931 100644 --- a/1. Build a Passenger Counter App/1. Welcome to the course/index.css +++ b/1. Build a Passenger Counter App/1. Welcome to the course/index.css @@ -1,4 +1,6 @@ html, body { margin: 0; padding: 0; + text-align: center; + font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; } \ No newline at end of file diff --git a/1. Build a Passenger Counter App/1. Welcome to the course/index.html b/1. Build a Passenger Counter App/1. Welcome to the course/index.html index 264d9b51..1a9dd6b3 100644 --- a/1. Build a Passenger Counter App/1. Welcome to the course/index.html +++ b/1. Build a Passenger Counter App/1. Welcome to the course/index.html @@ -1,9 +1,12 @@ -
+ + +Previous entries:
+ + + diff --git a/1. Build a Passenger Counter App/my-work/index.js b/1. Build a Passenger Counter App/my-work/index.js new file mode 100644 index 00000000..ace8a634 --- /dev/null +++ b/1. Build a Passenger Counter App/my-work/index.js @@ -0,0 +1,16 @@ +let saveEl = document.getElementById("save-el"); +let countEl = document.getElementById("count-el"); +let count = 0; +console.log(7); + +function incrementButtonClick() { + count += 1; + countEl.textContent = count; +} + +function saveButtonClick() { + let previousEntries = count + " - "; + saveEl.textContent += previousEntries; + count = 0; + countEl.textContent = count; +} diff --git a/1. Build a Passenger Counter App/my-work/station.jpg b/1. Build a Passenger Counter App/my-work/station.jpg new file mode 100644 index 00000000..53fac691 Binary files /dev/null and b/1. Build a Passenger Counter App/my-work/station.jpg differ diff --git a/2. Practice time - part 1/1. Variables practice/index.js b/2. Practice time - part 1/1. Variables practice/index.js index 5c9017d1..e9558b5b 100644 --- a/2. Practice time - part 1/1. Variables practice/index.js +++ b/2. Practice time - part 1/1. Variables practice/index.js @@ -1,7 +1,10 @@ // Create two variables, firstName and lastName +let firstName = "Wendy"; +let lastName = "Jade"; // Concatenate the two variables into a third variable called fullName +let fullName = firstName + " " + lastName; // Log fullName to the console - +console.log(fullName); diff --git a/2. Practice time - part 1/2. Contatenate two strings in a function/index.js b/2. Practice time - part 1/2. Contatenate two strings in a function/index.js index 0d77f812..d3b03683 100644 --- a/2. Practice time - part 1/2. Contatenate two strings in a function/index.js +++ b/2. Practice time - part 1/2. Contatenate two strings in a function/index.js @@ -3,3 +3,8 @@ let greeting = "Hi there" // Create a function that logs out "Hi there, Linda!" when called +function myGreeting() { + console.log(greeting + ", " + name + "!"); +} + +myGreeting(); \ No newline at end of file diff --git a/2. Practice time - part 1/3. Incrementing and decrementing/index.js b/2. Practice time - part 1/3. Incrementing and decrementing/index.js index c8ef6908..ab32f947 100644 --- a/2. Practice time - part 1/3. Incrementing and decrementing/index.js +++ b/2. Practice time - part 1/3. Incrementing and decrementing/index.js @@ -3,8 +3,21 @@ let myPoints = 3 // Create two functions, add3Points() and remove1Point(), and have them // add/remove points to/from the myPoints variable +function add3Points() { + myPoints += 3; +} +function remove1Point() { + myPoints -= 1; +} +for (i = 0; i < 3; i++) { + add3Points() +} + +for (x = 0; x < 2; x++) { + remove1Point() +} // Call the functions to that the line below logs out 10 console.log(myPoints) \ No newline at end of file diff --git a/2. Practice time - part 1/4. Strings and numbers/index.js b/2. Practice time - part 1/4. Strings and numbers/index.js index 5b65455a..13cc84a3 100644 --- a/2. Practice time - part 1/4. Strings and numbers/index.js +++ b/2. Practice time - part 1/4. Strings and numbers/index.js @@ -1,7 +1,7 @@ // Try to predict what each of the lines will log out -console.log("2" + 2) // -console.log(11 + 7) // -console.log(6 + "5") // -console.log("My points: " + 5 + 9) // -console.log(2 + 2) // -console.log("11" + "14") // +console.log("2" + 2) // 22 +console.log(11 + 7) // 18 +console.log(6 + "5") // 65 +console.log("My points: " + 5 + 9) // 59 +console.log(2 + 2) // 4 +console.log("11" + "14") // 1114 diff --git a/2. Practice time - part 1/5. Rendering an error message/index.html b/2. Practice time - part 1/5. Rendering an error message/index.html index 220b3fc7..dfc2b00e 100644 --- a/2. Practice time - part 1/5. Rendering an error message/index.html +++ b/2. Practice time - part 1/5. Rendering an error message/index.html @@ -5,7 +5,7 @@Nike shoe
- + diff --git a/2. Practice time - part 1/5. Rendering an error message/index.js b/2. Practice time - part 1/5. Rendering an error message/index.js index 46b0ffbc..31ab7aae 100644 --- a/2. Practice time - part 1/5. Rendering an error message/index.js +++ b/2. Practice time - part 1/5. Rendering an error message/index.js @@ -1,5 +1,13 @@ // When the user clicks the purchase button, render out // "Something went wrong, please try again" in the paragraph -// that has the id="error". +// that has the id="error" + +let errorEl = document.getElementById("error"); +console.log(errorEl); + +function displayMessage() { + errorEl.textContent = "Something went wrong, please try again"; +} + diff --git a/2. Practice time - part 1/6. Calculator challenge/index.html b/2. Practice time - part 1/6. Calculator challenge/index.html index ca440294..7464c6d3 100644 --- a/2. Practice time - part 1/6. Calculator challenge/index.html +++ b/2. Practice time - part 1/6. Calculator challenge/index.html @@ -6,12 +6,12 @@