To run test make sure to install the dependencies first using
npm install
oryarn
and then runnpx vitest
There is 8 questions from this challenge, here's the lists:
Create a function that accepts 3 parameters with string data type,
selectedText
,changedText
,text
selectedText
is a word that is gonna be changedchangedText
is a word that will replace theselectedText
text
is the string or the sentence
Create a function to check a number is Even or Odd, this function is accepting 1 parameter with number data type
- This function is returning
string
- If given argument is valid, this function should return either "GENAP" or "GANJIL"
- Validation if argument is not
number
data type
Create a function to check if given parameter is valid email address, this function is accepting 1 parameter called email which is
string
data type
- This function should return
string
- This function validate the given argument
Create a function to check if given parameter is valid password, this function is accepting 1 parameter called givenPassword with
string
data type
- Password length should be at least 8
- Password should have 1 lowercase letter
- Password should have 1 uppercase letter
- Password should have 1 number
- Validate given argument
- This function return
boolean
Create a function to return object