From 4c29df26e56f801cd5f73fdcf1ce5042ff571176 Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Sat, 19 Sep 2026 16:19:35 +0100 Subject: [PATCH 01/16] Fix HTML doctype casing and add CSS styles for form layout --- Form-Controls/index.html | 2 +- Form-Controls/style.css | 79 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 Form-Controls/style.css diff --git a/Form-Controls/index.html b/Form-Controls/index.html index 74b591ffc..e2ac38bba 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -1,4 +1,4 @@ - + diff --git a/Form-Controls/style.css b/Form-Controls/style.css new file mode 100644 index 000000000..a3ecf1c3d --- /dev/null +++ b/Form-Controls/style.css @@ -0,0 +1,79 @@ +body { + font-family: Arial, sans-serif; + background-color: #f2f2f2; + margin: 0; +} + +header { + background-color: #333; + color: white; + text-align: center; + padding: 20px; +} + +header h1 { + margin: 0; +} + +main { + max-width: 600px; + margin: 30px auto; + padding: 0 20px; +} + +fieldset { + background-color: white; + border: 1px solid #ccc; + border-radius: 8px; + padding: 20px; + margin-bottom: 20px; +} + +legend { + font-weight: bold; + padding: 0 20px; +} + +fieldset p { + margin-bottom: 15px; +} + +input[type="text"], +input[type="email"] { + display: block; + width: 100%; + box-sizing: border-box; + padding: 10px; + margin-top: 6px; + border: 1px solid #bbb; + border-radius: 5px; +} + +select { + display: block; + margin-top: 6px; + padding: 10px; + border: 1px solid #bbb; + border-radius: 5px; +} + +input[type="submit"] { + background-color: #bbb; + color: black; + font-weight: bold; + padding: 10px 20px; + border-radius: 5px; +} +input[type="text"]:focus, +input[type="email"]:focus, +input[type="radio"]:focus, +input[type="submit"]:focus, +select:focus { + outline: 3px solid black; +} + +footer { + font-weight: bold; + padding: 10px 20px; + margin-top: 6px; +} From 57d7614c012b8b87ac3d6c0f0f34ff3e00fd9789 Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Sun, 20 Sep 2026 23:34:21 +0100 Subject: [PATCH 02/16] Adding comments on line 3 --- Sprint-2/1-key-exercises/1-count.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sprint-2/1-key-exercises/1-count.js b/Sprint-2/1-key-exercises/1-count.js index 117bcb2b6..10c1e2ff2 100644 --- a/Sprint-2/1-key-exercises/1-count.js +++ b/Sprint-2/1-key-exercises/1-count.js @@ -4,3 +4,6 @@ count = count + 1; // Line 1 is a variable declaration, creating the count variable with an initial value of 0 // Describe what line 3 is doing, in particular focus on what = is doing + +// Line 3 is updating the count variable by reassigning new value that is count + 1 or (0 + 1 which is 1) +// The = operator is assigning the count variable we declared in line 1 with new value From 48049234a9a29097f3036033903aee67a2bd20d5 Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Sun, 20 Sep 2026 23:46:46 +0100 Subject: [PATCH 03/16] added the code to produce the string --- Sprint-2/1-key-exercises/2-initials.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sprint-2/1-key-exercises/2-initials.js b/Sprint-2/1-key-exercises/2-initials.js index 964c9563c..18ab057fa 100644 --- a/Sprint-2/1-key-exercises/2-initials.js +++ b/Sprint-2/1-key-exercises/2-initials.js @@ -5,6 +5,8 @@ const lastName = "Johnson"; // Declare a variable called initials that stores the first character of each string. // This should produce the string "CKJ", but you must not write the characters C, K, or J in the code of your solution. -const initials = ``; +const initials = `${firstName.charAt(0)}${middleName.charAt(0)}${lastName.charAt(0)}`; + +//console.log(initials); // https://www.google.com/search?q=get+first+character+of+string+mdn From 4c1a7549395d5b75915cd904d2c38fbe2cabe07e Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Mon, 21 Sep 2026 01:09:11 +0100 Subject: [PATCH 04/16] adding values to the var dir & var ext --- Sprint-2/1-key-exercises/3-paths.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Sprint-2/1-key-exercises/3-paths.js b/Sprint-2/1-key-exercises/3-paths.js index ab90ebb28..e17b9b632 100644 --- a/Sprint-2/1-key-exercises/3-paths.js +++ b/Sprint-2/1-key-exercises/3-paths.js @@ -12,12 +12,14 @@ const filePath = "/Users/mitch/cyf/Module-JS1/week-1/interpret/file.txt"; const lastSlashIndex = filePath.lastIndexOf("/"); const base = filePath.slice(lastSlashIndex + 1); -console.log(`The base part of ${filePath} is ${base}`); +//console.log(`The base part of ${filePath} is ${base}`); // Create a variable to store the dir part of the filePath variable // Create a variable to store the ext part of the variable -const dir = ; -const ext = ; +const dir = filePath.slice(0, lastSlashIndex); +const ext = base.slice(-4); +//console.log(dir); +//console.log(ext); -// https://www.google.com/search?q=slice+mdn \ No newline at end of file +// https://www.google.com/search?q=slice+mdn From bc9011c52370ac1ce1e71281255c51ccc7d700a1 Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Mon, 21 Sep 2026 01:49:11 +0100 Subject: [PATCH 05/16] explanation added on the expression --- Sprint-2/1-key-exercises/4-random.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sprint-2/1-key-exercises/4-random.js b/Sprint-2/1-key-exercises/4-random.js index 292f83aab..011620ddd 100644 --- a/Sprint-2/1-key-exercises/4-random.js +++ b/Sprint-2/1-key-exercises/4-random.js @@ -3,7 +3,17 @@ const maximum = 100; const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum; +console.log(num); + // In this exercise, you will need to work out what num represents? // Try breaking down the expression and using documentation to explain what it means // It will help to think about the order in which expressions are evaluated // Try logging the value of num and running the program several times to build an idea of what the program is doing + +// num is a variable declared to hold (being assigned) the value of the calculated result of the var minimum, var maximum and the Math.random() method +// This expression can be broken down in to main steps +// 1. the inner parentheses (maximum - minimum + 1) is calculated because that is the inner most expression +// 2. then the Math.random() generates random number between 0 & 1 and multiply with the result of (maximum - minimum + 1) +// 3. then the Math.floor() rounds down the result of (Math.random() * (maximum - minimum + 1)) to the nearest whole number +// 4. finally the minimum is being added to the down rounded whole number and the variable num holds the value +// after running the program the value of num looks like this 51,8,85,8,99,21 random numbers between 1 & 100 From 8f0d2a6047643d015aae44b736e3397133812df9 Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Mon, 21 Sep 2026 11:46:52 +0100 Subject: [PATCH 06/16] putting the instruction in comment --- Sprint-2/2-mandatory-errors/0.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Sprint-2/2-mandatory-errors/0.js b/Sprint-2/2-mandatory-errors/0.js index cf6c5039f..c9163b12e 100644 --- a/Sprint-2/2-mandatory-errors/0.js +++ b/Sprint-2/2-mandatory-errors/0.js @@ -1,2 +1,9 @@ -This is just an instruction for the first activity - but it is just for human consumption -We don't want the computer to run these 2 lines - how can we solve this problem? \ No newline at end of file +// This is just an instruction for the first activity - but it is just for human consumption +// We don't want the computer to run these 2 lines - how can we solve this problem? + +//OR + +/* This is just an instruction for the first activity - but it is just for human consumption +We don't want the computer to run these 2 lines - how can we solve this problem? */ + +// We can put the 2 lines in comment by adding // before each single line or we can enclose them in /* */ if we want to comment multi-line From d9ef10260af92837e8b123c719ca450f808a50af Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Mon, 21 Sep 2026 12:37:43 +0100 Subject: [PATCH 07/16] fixing the error by changing the declaration keyword --- Sprint-2/2-mandatory-errors/1.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Sprint-2/2-mandatory-errors/1.js b/Sprint-2/2-mandatory-errors/1.js index 7a43cbea7..0f1253bca 100644 --- a/Sprint-2/2-mandatory-errors/1.js +++ b/Sprint-2/2-mandatory-errors/1.js @@ -1,4 +1,12 @@ // trying to create an age variable and then reassign the value by 1 -const age = 33; +//const age = 33; +let age = 33; age = age + 1; +console.log(age); + +/* When we try to run the code it is giving us an error message saying TypeError: Assignment to constant variable, +this error is telling us that we are trying to perform an operation on a value that is not the correct type, +in our case reassigning a cons variable. The cons keyword prevents us from reassigning a variable +We can overcome the error by changing the declaration keyword to "let" +*/ From 191585542503d9ef7a33ec443e4979bb71a03ced Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Mon, 21 Sep 2026 12:56:48 +0100 Subject: [PATCH 08/16] fixing the error by declaring and initializing the var before accessing it --- Sprint-2/2-mandatory-errors/2.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Sprint-2/2-mandatory-errors/2.js b/Sprint-2/2-mandatory-errors/2.js index e09b89831..ab8687fe4 100644 --- a/Sprint-2/2-mandatory-errors/2.js +++ b/Sprint-2/2-mandatory-errors/2.js @@ -1,5 +1,11 @@ // Currently trying to print the string "I was born in Bolton" but it isn't working... // what's the error ? -console.log(`I was born in ${cityOfBirth}`); const cityOfBirth = "Bolton"; +console.log(`I was born in ${cityOfBirth}`); +//const cityOfBirth = "Bolton"; + +/* When we try to run our code it is giving us an error saying ReferenceError: Cannot access 'cityOfBirth' before initialization +and this is because we tried to access the var cityOfBirth before we declared and initialized it*/ + +// We can overcome this error by declaring and initializing the var cityOfBirth before accessing it From 0821e2bfaf4e49e8d46a533da09b9d744bcd3ad1 Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Tue, 22 Sep 2026 11:42:47 +0100 Subject: [PATCH 09/16] updating var cardNumber into String so that the slice method can work --- Sprint-2/2-mandatory-errors/3.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sprint-2/2-mandatory-errors/3.js b/Sprint-2/2-mandatory-errors/3.js index ec101884d..296286bd6 100644 --- a/Sprint-2/2-mandatory-errors/3.js +++ b/Sprint-2/2-mandatory-errors/3.js @@ -1,5 +1,7 @@ const cardNumber = 4533787178994213; -const last4Digits = cardNumber.slice(-4); +//const last4Digits = cardNumber.slice(-4); +const last4Digits = cardNumber.toString().slice(-4); +console.log(last4Digits); // The last4Digits variable should store the last 4 digits of cardNumber // However, the code isn't working @@ -7,3 +9,8 @@ const last4Digits = cardNumber.slice(-4); // Then run the code and see what error it gives. // Consider: Why does it give this error? Is this what I predicted? If not, what's different? // Then try updating the expression last4Digits is assigned to, in order to get the correct value + +// I am predicting the code wont't work because the slice method does not work for numbers I guess +// when i run the program it is giving an error saying "TypeError: cardNumber.slice is not a function" +// It is giving this error because our var cardNumber is number and numbers don't have slice() method & it is what I predicted +// In order our code to be able to run we need first to change the number type into String so that the slice() method can function From c5ba16acd06ab9b4d67d455c282ac91d59f87073 Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Tue, 22 Sep 2026 12:06:26 +0100 Subject: [PATCH 10/16] removing the starting digit that caused error from the variable name --- Sprint-2/2-mandatory-errors/4.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Sprint-2/2-mandatory-errors/4.js b/Sprint-2/2-mandatory-errors/4.js index 5f86c730b..76b74be8b 100644 --- a/Sprint-2/2-mandatory-errors/4.js +++ b/Sprint-2/2-mandatory-errors/4.js @@ -1,2 +1,13 @@ -const 12HourClockTime = "8:53pm"; -const 24hourClockTime = "20:53"; +//const 12HourClockTime = "8:53pm"; +//const 24hourClockTime = "20:53"; + +const HourClockTime12 = "8:53pm"; +const hourClockTime24 = "20:53"; + +console.log(HourClockTime12); +console.log(hourClockTime24); + +// when we tried to run the code it threw an error saying "SyntaxError: Invalid or unexpected token" +// this happened because when we were declaring a variable we gave an invalid name to the identifier which started with number +// variable name must start with letters or _ or $ +// we can fix it buy removing the front number of the identifiers and may be put them last From 8f7878f117a0095779cfa0dd1f866647f4c1bc0a Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Tue, 22 Sep 2026 12:41:44 +0100 Subject: [PATCH 11/16] adding answers and explanations and fixing the error to the given code --- .../1-percentage-change.js | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Sprint-2/3-mandatory-interpret/1-percentage-change.js b/Sprint-2/3-mandatory-interpret/1-percentage-change.js index e24ecb8e1..f3120dbc3 100644 --- a/Sprint-2/3-mandatory-interpret/1-percentage-change.js +++ b/Sprint-2/3-mandatory-interpret/1-percentage-change.js @@ -2,7 +2,8 @@ let carPrice = "10,000"; let priceAfterOneYear = "8,543"; carPrice = Number(carPrice.replaceAll(",", "")); -priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," "")); +//priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," "")); +priceAfterOneYear = Number(priceAfterOneYear.replaceAll(",", "")); const priceDifference = carPrice - priceAfterOneYear; const percentageChange = (priceDifference / carPrice) * 100; @@ -20,3 +21,21 @@ console.log(`The percentage change is ${percentageChange}`); // d) Identify all the lines that are variable declarations // e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression? + +// Answer + +// a) In this file we can say we have 5 function calls (2 function calls & 3 method calls to be specific) and they are in line 4, 5 and 10 + +// b) When we run the code the error is generating from line 5 and the reason is that when we pass more than 1 argument +// in a method we need to separate them with comma, but in line 5 there is no comma to separate the arguments +// we can fix it by adding a comma to separate the arguments + +// c) Lines 4 and 5 are reassignment statements + +// d) Lines 1, 2, 7 and 8 are variable declarations + +// e) The expression Number(carPrice.replaceAll(",","")) +// 1. carPrice.replaceAll(",","") this method is removing the "," from the String variable carPrice by replacing the "," with empty String which is "" +// all left then is just the String digits without "," +// 2. Number("String digit without comma") and this function converts the String digit to number digit +// and finally Number(carPrice.replaceAll(",","")) expression gives us number From a469ac41c226da6fb29d2075ab52d7e48e04f44c Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Tue, 22 Sep 2026 13:51:02 +0100 Subject: [PATCH 12/16] explaining the code --- Sprint-2/3-mandatory-interpret/2-time-format.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Sprint-2/3-mandatory-interpret/2-time-format.js b/Sprint-2/3-mandatory-interpret/2-time-format.js index 47d239558..75221ede1 100644 --- a/Sprint-2/3-mandatory-interpret/2-time-format.js +++ b/Sprint-2/3-mandatory-interpret/2-time-format.js @@ -23,3 +23,19 @@ console.log(result); // e) What do you think the variable result represents? Can you think of a better name for this variable? // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer + +// Answer + +// a) In the above code there are 6 variable declarations + +// b) There is only 1 function call in the code + +// c) the expression movieLength % 60 is trying to divide the movieLength by 60 then get the remainder + +// d) totalMinutes = (movieLength - remainingSeconds) / 60 in this expression +// 1. (movieLength - remainingSeconds) the values inside the parenthesis is calculated first then it is divided by 60 +// then the value of expression is assigned to the var totalMinutes + +// e) the variable result represents the formatted time in hours:minutes:seconds. I would rename it time + +// f) it will not work with negative numbers because we can not have negative time From da54930d66255678808ed432266e396e7bd057da Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Tue, 22 Sep 2026 19:18:33 +0100 Subject: [PATCH 13/16] detailed explanation about the code --- Sprint-2/3-mandatory-interpret/3-to-pounds.js | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/Sprint-2/3-mandatory-interpret/3-to-pounds.js b/Sprint-2/3-mandatory-interpret/3-to-pounds.js index 60c9ace69..965bd131f 100644 --- a/Sprint-2/3-mandatory-interpret/3-to-pounds.js +++ b/Sprint-2/3-mandatory-interpret/3-to-pounds.js @@ -2,13 +2,13 @@ const penceString = "399p"; const penceStringWithoutTrailingP = penceString.substring( 0, - penceString.length - 1 + penceString.length - 1, ); const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0"); const pounds = paddedPenceNumberString.substring( 0, - paddedPenceNumberString.length - 2 + paddedPenceNumberString.length - 2, ); const pence = paddedPenceNumberString @@ -25,3 +25,43 @@ console.log(`£${pounds}.${pence}`); // To begin, we can start with // 1. const penceString = "399p": initialises a string variable with the value "399p" + +// 2. From line 3 to line 6 const penceStringWithoutTrailingP is declared and it will hold the value of +// penceString.substring(0, penceString.length - 1) +// which is "399". We got this value by the method substring(0, penceString.length - 1) called by penceString +// Breaking down the expression penceString.substring(0, penceString.length - 1) +// a) penceString.length - 1 this counts the number of characters in the penceString String and then subtracts 1 from it (4-1=3) +// then it will look like this penceString.substring(0, 3) +// b) penceString.substring(0, penceString.length - 1) then the substring method called by penceString +// is used produce a slice of small string from a big string +// it takes two arguments the first one tells where to start slicing and the second one tells where to stop +// (but the last character is not included) +// Therefore const penceStringWithoutTrailingP will be assigned "399" + +// 3. In line 8 const paddedPenceNumberString is declared and it will hold the value of penceStringWithoutTrailingP.padStart(3, "0") +// which is still "399". In this expression we used the method padStart called by penceStringWithoutTrailingP and this method is basically +// adds characters at the start of our String. It takes two arguments the first one is telling how many characters we want in our String +// and second argument tells the character that needs to be added so that we get out desired number of characters in our String. +// since our String length is 3 the method will not do anything + +// 4. From line 9 to line 12 const pounds is declared and it will hold the value of paddedPenceNumberString.substring(0, paddedPenceNumberString.length - 2,) +// which is "3". We got this value by the method substring(0, paddedPenceNumberString.length - 2,) called by paddedPenceNumberString +// Breaking down the expression paddedPenceNumberString.substring(0, paddedPenceNumberString.length - 2,) +// a) paddedPenceNumberString.length - 2 this counts the number of characters in the paddedPenceNumberString then subtracts 2 from it (3-2=1) +// then it will look like this paddedPenceNumberString.substring(0, 1) +// b) paddedPenceNumberString.substring(0, paddedPenceNumberString.length - 2,) then the substring method called by paddedPenceNumberString is used to +// produce a slice of small string from a big string +// it takes two arguments the first one tells where to start slicing and the second one tells where to stop +// (but the last character is not included) +// Therefore const pounds will assigned "3" + +// 5. From line 14 to line 16 const pence is declared and it will hold the value of +// paddedPenceNumberString.substring(paddedPenceNumberString.length - 2).padEnd(2, "0") which is "99" +// Breaking down the expression +// a) paddedPenceNumberString.length - 2 this will count the number of characters in paddedPenceNumberString and then subtracts 2 from it (3-2=1) +// paddedPenceNumberString.substring(paddedPenceNumberString.length - 2) then this substring method will produce small string from it starting from index 1 which will be "99" +//then finally paddedPenceNumberString.substring(paddedPenceNumberString.length - 2).padEnd(2, "0") the padEnd method will add characters at the end of the String +// and will take two arguments first will tell how many characters we need in our string and the second will tell the character that needs to be added +// since our String length is 2 the method will do nothing + +// 6. Finally line 18 will print out the desired format we have added what to be printed inside the back-ticks if they are variables we will put them in ${} From c1a241bc67102480b2dc7d6316b04ba0135495b6 Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Wed, 23 Sep 2026 07:35:57 +0100 Subject: [PATCH 14/16] correct typos and explain alert and prompt in Chrome console --- Sprint-2/4-stretch-explore/chrome.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Sprint-2/4-stretch-explore/chrome.md b/Sprint-2/4-stretch-explore/chrome.md index 962580b82..198f9c67a 100644 --- a/Sprint-2/4-stretch-explore/chrome.md +++ b/Sprint-2/4-stretch-explore/chrome.md @@ -1,15 +1,20 @@ -Open a new window in Chrome, right click an empty space on the page, select **Inspect** from the dropdown, then locate the **Console** tab. +Open a new window in Chrome, right click page, select **Inspect** from the dropdown, then locate the **Console** tab. Voila! You now have access to the [Chrome V8 Engine](https://www.cloudflare.com/en-gb/learning/serverless/glossary/what-is-chrome-v8/). Just like the Node REPL, you can input JavaScript code into the Console tab and the V8 engine will execute it. Let's try an example. -In the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`; +Click an empty space on tn the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`; What effect does calling the `alert` function have? +// The `alert` function displays a message to the user and it stops js execution until the user dismisses the alert + Now try invoking the function `prompt` with a string input of `"What is your name?"` - store the return value of your call to `prompt` in an variable called `myName`. What effect does calling the `prompt` function have? What is the return value of `prompt`? + +// The `prompt` function opens a popup dialog and waits an input from a user. it stops js execution until the user inputs or cancel the popup dialog +// The return value of `prompt` is a string From 9ff581f7f29b42e1d06c3000073812f80295bf8f Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Wed, 23 Sep 2026 07:58:37 +0100 Subject: [PATCH 15/16] add explanations for console methods and dot operator usage --- Sprint-2/4-stretch-explore/objects.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sprint-2/4-stretch-explore/objects.md b/Sprint-2/4-stretch-explore/objects.md index 0216dee56..4ec83cf1e 100644 --- a/Sprint-2/4-stretch-explore/objects.md +++ b/Sprint-2/4-stretch-explore/objects.md @@ -13,4 +13,9 @@ Try also entering `typeof console` Answer the following questions: What does `console` store? + +// `console` stores methods + What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean? + +// The `console.log` or `console.assert` means access log or assert method from console object and the `.` is called the dot operator, and it is used to access the property or method of an object or value From 5bbf762a648cd9bf983455170e2e0b727b734d91 Mon Sep 17 00:00:00 2001 From: Aklilu Mihtsun Date: Wed, 23 Sep 2026 10:05:28 +0100 Subject: [PATCH 16/16] Remove unrelated form controls changes --- Form-Controls/index.html | 2 +- Form-Controls/style.css | 79 ---------------------------------------- 2 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 Form-Controls/style.css diff --git a/Form-Controls/index.html b/Form-Controls/index.html index e2ac38bba..74b591ffc 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -1,4 +1,4 @@ - + diff --git a/Form-Controls/style.css b/Form-Controls/style.css deleted file mode 100644 index a3ecf1c3d..000000000 --- a/Form-Controls/style.css +++ /dev/null @@ -1,79 +0,0 @@ -body { - font-family: Arial, sans-serif; - background-color: #f2f2f2; - margin: 0; -} - -header { - background-color: #333; - color: white; - text-align: center; - padding: 20px; -} - -header h1 { - margin: 0; -} - -main { - max-width: 600px; - margin: 30px auto; - padding: 0 20px; -} - -fieldset { - background-color: white; - border: 1px solid #ccc; - border-radius: 8px; - padding: 20px; - margin-bottom: 20px; -} - -legend { - font-weight: bold; - padding: 0 20px; -} - -fieldset p { - margin-bottom: 15px; -} - -input[type="text"], -input[type="email"] { - display: block; - width: 100%; - box-sizing: border-box; - padding: 10px; - margin-top: 6px; - border: 1px solid #bbb; - border-radius: 5px; -} - -select { - display: block; - margin-top: 6px; - padding: 10px; - border: 1px solid #bbb; - border-radius: 5px; -} - -input[type="submit"] { - background-color: #bbb; - color: black; - font-weight: bold; - padding: 10px 20px; - border-radius: 5px; -} -input[type="text"]:focus, -input[type="email"]:focus, -input[type="radio"]:focus, -input[type="submit"]:focus, -select:focus { - outline: 3px solid black; -} - -footer { - font-weight: bold; - padding: 10px 20px; - margin-top: 6px; -}