subject
Computers and Technology, 25.04.2020 03:15 ayjahj

The validCredentials() function contains two parallel arrays of usernames and passwords. Modify validCredentials() to use the .indexOf () method to search the usernames array for the given enteredUsername. If the username is found, the same location in the passwords array should contain the enteredPassword. Return true if the passwords are equal, false otherwise. validCredentials() should also return false if the given username was not found 2 I false otherwise 3 function , enteredPassword) 4 5// Database of usernames and passwords 6 var usernames = ["smith", "tron", 7 var passwords = ["qwerty", "End0fL ine", "year1942", "1adyj123", ace" "ladyj", "anon"]; "PASSWORD"); 9 I Search the usernames array for enteredUsername 10 11 // Only return true if the enteredUsername is in username, and the 12 // same location in passwords is enteredPassword 13 return true 15 17 console. log(" Login for ladyj:"validCredentialsC"Ladyj", "ladyj123)); // true 18 console. log("Login for ace: " validCredentialsC"ace", "wrong"); // false 19 console. log("Login for jake: " validCredentialsC"jake", "???"); // false Run JavaScript Reset code Your console output Login for ladyj: true Login for ace: true Login for jake:

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:00
Check my work the microprocessor is a(n) circuit, which is designed to process data based on a set of instructions. most desktop and laptop devices contain a microprocessor based on the standard. most tablets and smartphones contain processors based on technology. a microprocessor's circuitry is designed to perform a limited number of tasks contained in its set. during processing, an instruction is loaded into the processor's unit. data is loaded into registers in the processor's where arithmetic and logic operations are performed. microprocessor performance can be measured by its speed. other factors affecting overall processing performance include word size, cache size, and instruction set complexity. most digital devices contain only one microprocessor chip, but today's multi- processors contain circuitry that supports parallel processing. computers contain various kinds of memory. random memory is a special holding area for data, program instructions, and the system. it stores data on a temporary basis until the processor makes a data request. ram is different from disk storage because it is , which means that it can hold data only when the computer power is turned on. computers also contain read- memory, which is a type of non-volatile memory that provides a set of "hard-wired" instructions, called the loader, that a computer uses to boot up.
Answers: 3
question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print. wiki presentation paint desktop publishing
Answers: 3
question
Computers and Technology, 22.06.2019 19:00
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
You know the right answer?
The validCredentials() function contains two parallel arrays of usernames and passwords. Modify vali...
Questions
question
Mathematics, 09.10.2019 16:30
Questions on the website: 13722365