GPT-5 Announcement: OpenAI Reveals Next-Generation AI Model
-OpenAI's latest language model demonstrates unprecedented reasoning capabilities and achieves human-level performance across various domains.
- Artificial Intelligence -diff --git a/array_challenges.js b/array_challenges.js index 3e3c564..4ca10b0 100644 --- a/array_challenges.js +++ b/array_challenges.js @@ -1,71 +1,11 @@ - -/* - -The Dataset: Movie Mania - -You are managing a database for a **movie rental platform** called **Movie Mania**. The dataset is an array of objects, where each object represents a movie with the following properties: - -- `title` (string): The title of the movie. -- `genre` (string): The genre of the movie (e.g., "Action", "Comedy", "Drama"). -- `rating` (number): The average viewer rating (out of 10). -- `rented` (boolean): Whether the movie has been rented. - -*/ - -const movies = [ - { title: "Fast & Furious 10", genre: "Action", rating: 7.5, rented: true }, - { title: "The Notebook", genre: "Drama", rating: 8.0, rented: false }, - { title: "Spider-Man: No Way Home", genre: "Action", rating: 8.7, rented: true }, - { title: "Superbad", genre: "Comedy", rating: 7.0, rented: false }, - { title: "The Dark Knight", genre: "Action", rating: 9.0, rented: true }, - { title: "The Intern", genre: "Comedy", rating: 7.4, rented: false } - ]; - - /* - - Task 1: Movie Titles and Ratings 🎥 (`.map`) - - Your manager asks you to display a list of all movie titles and their ratings - for a promotional email campaign. - - Steps: - 1. Use `.map` to create a new array where each item is a string in this format: - "[title] - Rating: [rating]/10" - 2. Log the resulting array. - - Expected Output: - [ - "Fast & Furious 10 - Rating: 7.5/10", - "The Notebook - Rating: 8.0/10", - "Spider-Man: No Way Home - Rating: 8.7/10", - "Superbad - Rating: 7.0/10", - "The Dark Knight - Rating: 9.0/10", - "The Intern - Rating: 7.4/10" - ] - */ - - // ✍️ Solve it here ✍️ - - - /* - Task 2: Find Highly Rated Movies 🌟 (`.filter`) - - Your customers have requested a list of **highly rated movies** - (movies with a rating of 8.0 or higher). - - Steps: - 1. Use `.filter` to create a new array containing only the movies with a rating >= 8.0. - 2. Log the resulting array. - - Expected Output: - [ - { title: "The Notebook", genre: "Drama", rating: 8.0, rented: false }, - { title: "Spider-Man: No Way Home", genre: "Action", rating: 8.7, rented: true }, - { title: "The Dark Knight", genre: "Action", rating: 9.0, rented: true } - ] - */ - - // ✍️ Solve it here ✍️ - - - \ No newline at end of file +const titlesAndRatings = movies.map(function(movie){ + var t = String(movie.title); + var r = Number(movie.rating); + return t + ' - ' + r.toFixed(1); +}); +console.log('Formatted:', titlesAndRatings); + +const highRated = movies.filter(function(movie){ + return Number(movie.rating) >= 8.0; +}); +console.log('High rated (>=8.0):', highRated); diff --git a/dom_challenges.js b/dom_challenges.js index 1f414b8..3f72d0d 100644 --- a/dom_challenges.js +++ b/dom_challenges.js @@ -1,196 +1,139 @@ -// News articles data organized by category -export const newsData = { - "Latest News": [ - { - title: "GPT-5 Announcement: OpenAI Reveals Next-Generation AI Model", - date: "March 14, 2024", - excerpt: - "OpenAI's latest language model demonstrates unprecedented reasoning capabilities and achieves human-level performance across various domains.", - image: "https://images.unsplash.com/photo-1677442136019-21780ecad995", - tag: "Artificial Intelligence", - }, - { - title: "SpaceX Successfully Launches New Satellite Constellation", - date: "March 13, 2024", - excerpt: - "Starship completes its most ambitious mission yet, deploying 50 satellites in a single launch and advancing global internet coverage goals.", - image: "https://images.unsplash.com/photo-1541185933-ef5d8ed016c2", - tag: "Space Tech", - }, - { - title: "Apple Unveils Revolutionary Mixed Reality Device", - date: "March 12, 2024", - excerpt: - "The tech giant's latest hardware release promises to transform how we interact with digital content through advanced spatial computing.", - image: "https://images.unsplash.com/photo-1592478411213-6153e4ebc07d", - tag: "Hardware", - }, - ], - "Technology": [ - { - title: "Revolutionary Quantum Computer Achieves New Milestone", - date: "March 12, 2024", - excerpt: - "IBM's latest quantum processor demonstrates quantum advantage in real-world applications, marking a historic milestone in computing.", - image: "https://images.unsplash.com/photo-1635070041078-e363dbe005cb", - tag: "Quantum Computing", - }, - { - title: "New Processor Architecture Promises 50% Better Efficiency", - date: "March 11, 2024", - excerpt: - "TSMC and AMD collaborate on groundbreaking 2nm chip design, setting new standards for performance and energy efficiency.", - image: "https://images.unsplash.com/photo-1591799264318-7e6ef8ddb7ea", - tag: "Hardware", - }, - { - title: "Revolutionary Battery Technology Triples EV Range", - date: "March 10, 2024", - excerpt: - "Breakthrough in solid-state battery technology promises to revolutionize electric vehicles with extended range and faster charging.", - image: "https://images.unsplash.com/photo-1593941707882-a5bba14938c7", - tag: "Energy Tech", - }, - ], - "AI & ML": [ - { - title: "DeepMind's AlphaFold 3 Revolutionizes Drug Discovery", - date: "March 10, 2024", - excerpt: - "Latest version of protein structure prediction AI leads to breakthrough discoveries in pharmaceutical research and disease treatment.", - image: "https://images.unsplash.com/photo-1532187863486-abf9dbad1b69", - tag: "Healthcare AI", - }, - { - title: "AI-Powered Drug Discovery Platform Shows Promise", - date: "March 9, 2024", - excerpt: - "Machine learning platform identifies novel drug candidates for rare diseases, reducing development time by 60%.", - image: "https://images.unsplash.com/photo-1585435557343-3b092031a831", - tag: "Healthcare AI", - }, - { - title: "AI System Masters Complex Strategy Game Go", - date: "March 8, 2024", - excerpt: - "New reinforcement learning algorithm demonstrates unprecedented strategic thinking in ancient board game.", - image: "https://images.unsplash.com/photo-1529699211952-734e80c4d42b", - tag: "Game AI", - }, - ], - "Web Development": [ - { - title: "Next.js 14 Released with Revolutionary Features", - date: "March 8, 2024", - excerpt: - "Vercel introduces game-changing features including enhanced server components and automatic performance optimization.", - image: "https://images.unsplash.com/photo-1555066931-4365d14bab8c", - tag: "Frontend", - }, - { - title: "WebAssembly Reaches New Adoption Milestone", - date: "March 7, 2024", - excerpt: - "Major browsers announce enhanced WebAssembly support, enabling near-native performance for web applications.", - image: "https://images.unsplash.com/photo-1461749280684-dccba630e2f6", - tag: "Web Technologies", - }, - { - title: "Chrome Introduces Revolutionary Dev Tools Features", - date: "March 6, 2024", - excerpt: - "Google Chrome's latest update includes AI-powered debugging and advanced performance analysis tools.", - image: "https://images.unsplash.com/photo-1542831371-29b0f74f9713", - tag: "Developer Tools", - }, - ], - "Cyber Security": [ - { - title: "Major Security Vulnerability Patched in Popular Framework", - date: "March 6, 2024", - excerpt: - "Critical zero-day vulnerability in Spring Framework patched, affecting millions of Java applications worldwide.", - image: "https://images.unsplash.com/photo-1550751827-4bd374c3f58b", - tag: "Security", - }, - { - title: "New Encryption Standard Proposed for IoT Devices", - date: "March 5, 2024", - excerpt: - "NIST announces quantum-resistant encryption standard specifically designed for resource-constrained IoT devices.", - image: "https://images.unsplash.com/photo-1518770660439-4636190af475", - tag: "IoT Security", - }, - { - title: "Advanced Persistent Threat Group Targeting Tech Firms", - date: "March 4, 2024", - excerpt: - "Cybersecurity firms uncover sophisticated attack campaign targeting technology companies worldwide.", - image: "https://images.unsplash.com/photo-1563986768609-322da13575f3", - tag: "Cyber Threats", - }, - ], -}; - -// html structure -{ - /*
OpenAI's latest language model demonstrates unprecedented reasoning capabilities and achieves human-level performance across various domains.
- Artificial Intelligence -