Back to Browse

Create a Country Search & Filter App with Javascript

527 views
Aug 27, 2023
45:51

#javascript #javascriptfilter #javascriptsearch #arrayfunctions #javascriptprojects #webdevelopment #vanillajavascript Source: https://github.com/refinedguides/country-search Demo: https://refinedguides.com/country-search/ Key Features Covered: 🔥 ➠ ✅ Fetch countries from external API ➠ ✅ Display country info in a grid ➠ ✅ Display continent filter as custom dropdown ➠ ✅ Search country by name, capital, or country code ➠ ✅ Filter country by continent ➠ ✅ Display country flag in a modal ➠ ✅ Close modal on `ESC` key ➠ ✅ Display *No Result* if no filtered countries 🌍 Ready to explore fundamental search and filter operations in JavaScript? This tutorial dives deep into the world of array functions, guiding you through practical examples of searches, filters, and sorts. While we use countries as the focus, these powerful techniques can be adapted to products, real estate listings, or any array-based data. During this tutorial, you'll unravel the mysteries behind key functions: 🔍 filter(): Locate countries matching your search keyword or residing on specific continents. 🌍 flatMap(): Effortlessly flatten arrays while mapping countries to their respective continents. 🔠 sort(): Master sorting by arranging countries alphabetically. 🔗 map(): Transform currency objects into arrays of strings for streamlined data. 📜 join(): Combine array elements to craft meaningful strings (e.g., capitals, continents, and currencies). 🔎 includes(): Quickly check if a specific string is present within a character list. This video is a perfect for web development enthusiasts, especially those keen on JavaScript, array manipulation, and practical projects. By the end, you'll wield the skills to construct your own search and filter systems for diverse data types. Get ready to elevate your coding journey with a deep dive into JavaScript's array functions! 🚀 ⏱️ Timestamps: 00:00 Demo 01:40 Laying Out the HTML 04:15 Crafting the CSS 20:03 Integrating RESTCountries API 26:00 Display Countries in a Grid Layout 31:16 Display continents in custom dropdown 33:57 Search country implementation 36:57 Filter by continent implementation 40:25 Modal implementation 43:03 Escape implementation 43:52 Displaying No Results 44:45 Final Output 📚 Curious for More JavaScript and Web Dev Insights? Explore our playlist Vanilla JavaScript Projects for an enriched learning journey! 📖 https://youtube.com/playlist?list=PLUwyXDcov5KggUFeH1rtqpY6PJuPPdXFc Don't forget to like this video, subscribe to our channel, and hit the bell icon to get notified of future coding guides. If you have any questions or need help with the project, feel free to drop a comment below. Happy coding! 😃👍 Music by Aylex Source: https://freetouse.com/music Royalty Free Music for Video (Safe)

Download

1 formats

Video Formats

360pmp483.6 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Create a Country Search & Filter App with Javascript | NatokHD