GPT-5 Announcement: OpenAI Reveals Next-Generation AI Mod
OpenAI's latest language model demonstrates unprecedented reasoning capabilities and achieves human-level performance across various domains.
Artificial Intelligencediff --git a/array_challenges.js b/array_challenges.js index 3e3c564..c0aacd5 100644 --- a/array_challenges.js +++ b/array_challenges.js @@ -34,7 +34,7 @@ const movies = [ 2. Log the resulting array. Expected Output: - [ + [t "Fast & Furious 10 - Rating: 7.5/10", "The Notebook - Rating: 8.0/10", "Spider-Man: No Way Home - Rating: 8.7/10", @@ -45,6 +45,13 @@ const movies = [ */ // ✍️ Solve it here ✍️ +console.log(77) + + const newarray= movies.map((movetitle)=>{ + return`${movetitle.title} rating ${movetitle.rating} /10` + }) + + console.log(newarray) /* @@ -67,5 +74,11 @@ const movies = [ // ✍️ Solve it here ✍️ + const movies2= movies.filter((item)=>{ + if(item.rating>=8.0){ + return item + } + }) + console.log(movies2) \ No newline at end of file diff --git a/dom_challenges.js b/dom_challenges.js index bb943d5..9e998c1 100644 --- a/dom_challenges.js +++ b/dom_challenges.js @@ -1,5 +1,5 @@ -// News articles data organized by category +// // News articles data organized by category export const newsData = { 'Latest News': [ { @@ -126,35 +126,73 @@ export function displayArticles(category) { const articles = newsData[category]; // 1. Clear previous content + + const newsgrid=document.querySelector(".news-grid") + newsgrid.innerHTML=""; + + // 2. Create container elements + + const featuredArticle=document.createElement("div") + featuredArticle.className="featured-article" // 3. Create article element + + const featured=document.createElement("article") + + featured.className="news-card featured" // 4. Create and setup image - + const articleimg=document.createElement("img") + articleimg.src=articles.img; + articleimg.alt=articles.title; + articleimg.className="news-image" // 5. Create content container + const content=document.createElement("div") + content.className="news-content" // 6. Create featured label + const label=document.createElement("span") + label.className="featured-label" // 7. Create title + const heading=document.createElement("h2") + heading.className="news-title" + // 8. Create date + + const seconddiv=document.createElement("div") + seconddiv.className="news-date" // 9. Create excerpt + const pragraph=document.createElement("p") + pragraph.className="news-excerpt" // 10. Create tag - + const span = document.createElement("span"); +span.className = "tag"; + // 11. Assemble the elements + content.appendChild(label); +content.appendChild(heading); +content.appendChild(seconddiv); +content.appendChild(pragraph); +content.appendChild(span); +featured.appendChild(articleimg); +featured.appendChild(content); +featuredArticle.appendChild(featured); +newsgrid.appendChild(featuredArticle); newsContainer.insertBefore(featuredArticle, newsContainer.firstChild); } - +console.log("dommm") // DO NOT CHANGE THIS document.addEventListener('DOMContentLoaded', () => { const defaultCategory = 'Latest News'; // Define the default category displayArticles(defaultCategory); // Display articles for the default category document.querySelector(`.nav-links a[data-category="${defaultCategory}"]`).classList.add('active'); // Set active class -}); \ No newline at end of file +}); diff --git a/htmlstructure.html b/htmlstructure.html index ff721c2..ec7ea0a 100644 --- a/htmlstructure.html +++ b/htmlstructure.html @@ -1,3 +1,4 @@ +
OpenAI's latest language model demonstrates unprecedented reasoning capabilities and achieves human-level performance across various domains.
Artificial Intelligence