27 lines
685 B
JavaScript

const age = 20;
let names = ["david", "nika", "jozica", "domen", "eva", "denis"];
if (age > 20) {
console.log("Age is more that 20");
} else {
console.log("Age is is less than 20");
}
if (names.length > 5) {
console.log("Array has more than 5 items")
} else {
console.log("Array has less then 5 items")
}
const password = "ks453$%§87kj(/gf"
if (password.length >= 8 && password.includes("@")) {
console.log("The password is mighty strong")
}
else if (password.length >= 8 || password.includes('@') && password.length > 5) {
console.log("The password is long enough")
} else {
console.log("The password is not long enough")
}