From 2a2e7df36b11b9c1ba281d59420cdff921969563 Mon Sep 17 00:00:00 2001 From: Rawan Almutairi Date: Mon, 28 Sep 2026 19:55:50 +0100 Subject: [PATCH 1/4] I worked on forms --- Form-Controls/index.html | 64 ++++++++++++++++++++++++++++++++++++---- Form-Controls/style.css | 20 +++++++++++++ 2 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 Form-Controls/style.css diff --git a/Form-Controls/index.html b/Form-Controls/index.html index 74b591ffc..70ff25cf8 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -4,6 +4,7 @@ My form exercise + @@ -13,15 +14,66 @@

Product Pick

- - + + Enter your name: + + + + + + + +

Choose your T-shirt color:

+ +

please select a color:

+

+ +
+ +
+ +
+

+ + + + + + + +
+ +

+ + Enter your email: + +

+ + + +
+
- + + + diff --git a/Form-Controls/style.css b/Form-Controls/style.css new file mode 100644 index 000000000..6d2de6892 --- /dev/null +++ b/Form-Controls/style.css @@ -0,0 +1,20 @@ + + + body { color: #141414; + + background-color: #6aa57e; + + font-family: Georgia; + + + + +h1{ + +font-family: sans-serif; +color: rgba(15, 15, 15, 0.267); +background-color: #f5eeda; +text-align: center; +font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; + +} From ecabe3f52edfba19c1ebe9c8dc619ecdc57ad396 Mon Sep 17 00:00:00 2001 From: Rawan Almutairi Date: Mon, 28 Sep 2026 20:10:00 +0100 Subject: [PATCH 2/4] validata course work --- Form-Controls/validate-pr-metadata | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Form-Controls/validate-pr-metadata diff --git a/Form-Controls/validate-pr-metadata b/Form-Controls/validate-pr-metadata new file mode 100644 index 000000000..1762cea89 --- /dev/null +++ b/Form-Controls/validate-pr-metadata @@ -0,0 +1,19 @@ +name: Validate PR Metadata +on: + pull_request_target: + types: + - labeled + - unlabeled + - opened + - edited + - reopened + +jobs: + validate_pr_metadata: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: CodeYourFuture/actions/validate-pr-metadata@main + with: + give_more_specific_comment_for_earlier_learners: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From b4ccdd9a3159865a0e33ba30d48e7b55297997cf Mon Sep 17 00:00:00 2001 From: Rawan Almutairi Date: Mon, 28 Sep 2026 20:21:42 +0100 Subject: [PATCH 3/4] I worked on the excercises --- Sprint-2/1-key-exercises/1-count.js | 1 + Sprint-2/1-key-exercises/2-initials.js | 6 +++- Sprint-2/1-key-exercises/3-paths.js | 49 ++++++++++++++++++++++---- Sprint-2/1-key-exercises/4-random.js | 13 +++++++ 4 files changed, 62 insertions(+), 7 deletions(-) diff --git a/Sprint-2/1-key-exercises/1-count.js b/Sprint-2/1-key-exercises/1-count.js index 117bcb2b6..d0686196f 100644 --- a/Sprint-2/1-key-exercises/1-count.js +++ b/Sprint-2/1-key-exercises/1-count.js @@ -4,3 +4,4 @@ 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 +//a variable is initialised and assigned a value zero, than it was reassigned additing 1 to its value. \ No newline at end of file diff --git a/Sprint-2/1-key-exercises/2-initials.js b/Sprint-2/1-key-exercises/2-initials.js index 964c9563c..64e9000b1 100644 --- a/Sprint-2/1-key-exercises/2-initials.js +++ b/Sprint-2/1-key-exercises/2-initials.js @@ -5,6 +5,10 @@ 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 = ``; // https://www.google.com/search?q=get+first+character+of+string+mdn + +const initials = `${firstName[0]}${middleName[0]}${lastName[0]}`; + +console.log(initials); // Output: CKJ \ No newline at end of file diff --git a/Sprint-2/1-key-exercises/3-paths.js b/Sprint-2/1-key-exercises/3-paths.js index ab90ebb28..e1b3c3cda 100644 --- a/Sprint-2/1-key-exercises/3-paths.js +++ b/Sprint-2/1-key-exercises/3-paths.js @@ -9,15 +9,52 @@ // (All spaces in the "" line should be ignored. They are purely for formatting.) +//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}`); + +// 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 = ; + +// https://www.google.com/search?q=slice+mdn + +// from here start my explaination of the code I see for education purposes. +// this is a file system that allows users to manipulate what files they see and what information they omit, and they use string +//methods to do that +// most common methods developers use to manipulate the files are included in this file Sprint-2\1-key-exercises\manipulating files.txt + +// in this example the string methods are used to manipulate the file system + 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}`); +// a variable is created to store the file path of a file in the file system +//const lastSlashIndex = filePath.lastIndexOf("/"); +// a variable is created and identified to find the last occurance of the "/" character in the filePath variable, which is used to separate directories and files in a file system +//const base = filePath.slice(lastSlashIndex + 1); +// a variable is created and identified to extract the base part of the filePath variable, which is the name of the file and its extension, by using the slice method +//console.log(`The base part of ${filePath} is ${base}`); +// console.log is used to print the base part of the filePath variable to the console, which is the name of the file and its extension // 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 lastSlashIndex = filePath.lastIndexOf("/"); +// here we have the variable lastslashIndex already created and identified its position +// stores the position or (index) of "/" in filePath, so this "/" is used as a symbol that storers the number index or a place that seprate dir from base +const dir = filePath.slice(0, lastSlashIndex); +console.log(dir); +// we show our result in the console +const lastDotIndex = filePath.lastIndexOf('.'); +// we create a variable and assign its value using the indexOf to be from the dot location +const ext = filePath.slice(lastDotIndex); +// we create a variable where we assign its value using the slice method to be from the dot only -// https://www.google.com/search?q=slice+mdn \ No newline at end of file +console.log(ext) +// we print our result in the console +//slice(startIndex, endIndex) +// means, start here and stop here. we are doing this to seprate the dir from base so we need to tell it where to start and where to end, hence that is why we use slice method, +// my comments needs correcting to look profissional -_- \ No newline at end of file diff --git a/Sprint-2/1-key-exercises/4-random.js b/Sprint-2/1-key-exercises/4-random.js index 292f83aab..8a2a984df 100644 --- a/Sprint-2/1-key-exercises/4-random.js +++ b/Sprint-2/1-key-exercises/4-random.js @@ -7,3 +7,16 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum; // 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 + + +//here starts my learning + +// first const minimun, const maximum are the variables +// = the assignmen operator +// what comes after = is what the variable will store +// Math.floor is a method and here we are telling it that its argument is to use the random method +// and multiply the result before rounding with the maximum and minimum variables we created +// * is a multiplication operator +// to understand what is going on we need to understand what the floor and random methods do +//Math.floor (rounds down to the nearest whole number) and than pass it to Math.floor +// we are asking the program to round whatever result we have to the nearest whole number \ No newline at end of file From 7b64e8e927272f410520dc6162ef3c59f945c9d2 Mon Sep 17 00:00:00 2001 From: Rawan Almutairi Date: Mon, 28 Sep 2026 21:04:49 +0100 Subject: [PATCH 4/4] Worked on the excercises for sprint1 --- Sprint-2/1-key-exercises/1-count.js | 2 +- Sprint-2/1-key-exercises/2-initials.js | 10 +++++++++- Sprint-2/1-key-exercises/3-paths.js | 2 +- Sprint-2/1-key-exercises/4-random.js | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Sprint-2/1-key-exercises/1-count.js b/Sprint-2/1-key-exercises/1-count.js index d0686196f..91be8e317 100644 --- a/Sprint-2/1-key-exercises/1-count.js +++ b/Sprint-2/1-key-exercises/1-count.js @@ -4,4 +4,4 @@ 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 -//a variable is initialised and assigned a value zero, than it was reassigned additing 1 to its value. \ No newline at end of file +//a variable is initialised and assigned a value zero, than it was reassigned additing 1 to its value \ No newline at end of file diff --git a/Sprint-2/1-key-exercises/2-initials.js b/Sprint-2/1-key-exercises/2-initials.js index 64e9000b1..a749c3066 100644 --- a/Sprint-2/1-key-exercises/2-initials.js +++ b/Sprint-2/1-key-exercises/2-initials.js @@ -11,4 +11,12 @@ const lastName = "Johnson"; const initials = `${firstName[0]}${middleName[0]}${lastName[0]}`; -console.log(initials); // Output: CKJ \ No newline at end of file +console.log(initials); // Output: CKJ + + + + + + + + diff --git a/Sprint-2/1-key-exercises/3-paths.js b/Sprint-2/1-key-exercises/3-paths.js index e1b3c3cda..18a3c6fb7 100644 --- a/Sprint-2/1-key-exercises/3-paths.js +++ b/Sprint-2/1-key-exercises/3-paths.js @@ -57,4 +57,4 @@ console.log(ext) // we print our result in the console //slice(startIndex, endIndex) // means, start here and stop here. we are doing this to seprate the dir from base so we need to tell it where to start and where to end, hence that is why we use slice method, -// my comments needs correcting to look profissional -_- \ No newline at end of file +//my comments needs correcting to look profissional -_- \ No newline at end of file diff --git a/Sprint-2/1-key-exercises/4-random.js b/Sprint-2/1-key-exercises/4-random.js index 8a2a984df..b8ffbd97e 100644 --- a/Sprint-2/1-key-exercises/4-random.js +++ b/Sprint-2/1-key-exercises/4-random.js @@ -19,4 +19,4 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum; // * is a multiplication operator // to understand what is going on we need to understand what the floor and random methods do //Math.floor (rounds down to the nearest whole number) and than pass it to Math.floor -// we are asking the program to round whatever result we have to the nearest whole number \ No newline at end of file +// we are asking the program to round whatever result we have to the nearest whole number. \ No newline at end of file