Currently, I am in the process of adding another user and have been exploring various code snippets available on different websites.
I decided to test the following example, which worked perfectly. However, I am now wondering how I can add an additional user, perhaps one for a guest account?
Is this achievable using some sort of conditional statement?
My main goal is to enhance my knowledge of Javascript programming and understand how to tackle these relatively simple tasks.
methods: {
login() {
if(this.input.username == "admin1" && this.input.password == "pass1") {
this.$store.commit("setAuthentication", true);
this.$router.replace({ name: "secure" });
} else {
console.log("The username and / or password is incorrect");
}
}
}