Menu
Coddy logo textTech

Recap - Validation Function

Part of the Fundamentals section of Coddy's JavaScript journey — lesson 52 of 77.

challenge icon

Challenge

Easy

Write a function named isValid that gets two string arguments, username and password.

The function will return True if the username and password are valid in the system, otherwise False.

Our system contains only two valid usernames - "admin" and "user".

The valid password for username "user" is "qweasd".

For username "admin" any password is valid!

Bonus: Make the function an arrow function!

Try it yourself

All lessons in Fundamentals