Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Northwest-Class 4-Abed Al-JS Core 2-Week3-InClass & Mandatory#85

Open
Abed-Aghbar wants to merge 1 commit intoCodeYourFuture:mainfrom
Abed-Aghbar:main
Open

Northwest-Class 4-Abed Al-JS Core 2-Week3-InClass & Mandatory#85
Abed-Aghbar wants to merge 1 commit intoCodeYourFuture:mainfrom
Abed-Aghbar:main

Conversation

@Abed-Aghbar
Copy link
Copy Markdown

Your Details

  • Your Name:
  • Your City:
  • Your Slack Name:

Homework Details

  • Module:
  • Week:

Prefer to work on a codepen? https://codepen.io/makanti/pen/abOreLg
================
*/
setTimeout(() => {
Copy link
Copy Markdown

@mike-shields-dev mike-shields-dev Aug 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Abed.

];

// create showMovies function
showMovies(movie);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a typo here. movie should be movies

// create showMovies function
showMovies(movie);

function showMovies(movies) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work Abed. movie instead of item would be better in the forEach method.

}


function showMovies(movies) {
Copy link
Copy Markdown

@mike-shields-dev mike-shields-dev Aug 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work Abed. I see that you are removing any pre-existing movie paragraphs from #all-movies before running this function, to avoid duplication. Another way to handle this problem would be to create a container element to append the movies to, then append this to #all-movies. This would separate .alert from the listed movies.

================
*/

const submit = document.getElementById('submit');
Copy link
Copy Markdown

@mike-shields-dev mike-shields-dev Aug 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work Abed. You have the right idea here but the Task asked for a form. It's been a long time since we did forms. Have a read of this: https://www.javascripttutorial.net/javascript-dom/javascript-form/



const all_image = document.querySelectorAll("img");
all_images.forEach((img) => {
Copy link
Copy Markdown

@mike-shields-dev mike-shields-dev Aug 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Abed, you have a typo here. Besides that this works. I know you are coming from Python but camelCase is preferred over snake_case in JavaScript.

},
];

Array.from(allSections).map((element, index) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Abed, fix the typo and this works. Make sure you check the console in the browser's dev tools for errors. They will help you find typos like this one.

@@ -1,5 +1,23 @@
function setAlarm() {}
function setAlarm() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Abed, there is a bug though. What happens when you try to set the Alarm while the timer is already running? What is causing this bug and how could you fix it?

@@ -1 +1,37 @@
/** Write your CSS in here **/
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Abed, look through the styles to see if you can find a reason why the text does not show in the browser.

const quote_div = document.getElementById('quote_div');
const button = document.getElementById('button');
let quote = document.getElementById("quote_h1");
let author = document.getElementById("author");
Copy link
Copy Markdown

@mike-shields-dev mike-shields-dev Aug 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Abed, you have a typo here, please check the id of the element you want.

};

// When the new quote button is clicked, call the function newQuote
newQuoteBtn.addEventListener("click", newQuote);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Abed, you have a typo here, you can't attach an event listener to an element that doesn't exist.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants