62.getCheckPassword

Write a function named getCheckPassword that receives a string representing a password as a parameter.

The function should return another function - let's name it checkPassword. This returned function will receive a string as a parameter and should return true if it maches the password. Otherwise it should return false.

Example 1

const checkPassword = getCheckPassword("mySecretPassword");
checkPassword("1234"); // should return  "false"
checkPassword("test!@"); // should return "false"
checkPassword("mySecretPassword"); // should return "true"