frankwarnaar / minor-wafs Goto Github PK
View Code? Open in Web Editor NEWRepository for web app from scratch at CMD minor Everything web
Repository for web app from scratch at CMD minor Everything web
You could rewrite sections.toggle
as such:
const sections = {
toggle: route => {
const sections = Array.from(document.querySelectorAll('section'));
sections.forEach(section => route.includes(section.id) ? section.classList.remove('hidden') : section.classList.add('hidden'));
}
}
This also solves #4
Linters often expect global options to be on the first line.
use method definitions instead
this.hideAllSections();
this.showSection(route);
Eerst wordt iedere section ge-hide, daarna de actieve geopend. Misschien kan je één iteratie in je loop minder krijgen als je checkt in de loop welke wel en niet geactiveerd moet worden!
Could it be a little more specific for the thing you are binding? Seeing as this is the event listener for routing, you might not want to bind it along with other events.
In your object literals, you give functions both a key as well as a function name while they could be anonymous functions. Did you do that on purpose, and if so, why?
Could you come up with a way to toggle all of the classes inside the forEach loop for instance?
Are you sure you want to run strict mode on the global scope?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.