Retired

Give me an object! (retired)

Description:

Implement the function below that receives a key and value parameter which must return an object where the object's key must be concatenated with ID. and the value must receive the same input value.

You should return null when:

no argument is passed to the function key provided but no value key provided is not string type value provided but no key

Example:

{
  const obj =  toObjet("user", 1)
  console.log(obj) // must be { userID: 1 }
}

Similar Kata:

Stats:

CreatedJun 16, 2022
Warriors Trained12
Total Skips0
Total Code Submissions16
Total Times Completed5
JavaScript Completions5
Total Stars0
% of votes with a positive feedback rating0% of 4
Total "Very Satisfied" Votes0
Total "Somewhat Satisfied" Votes0
Total "Not Satisfied" Votes4
Total Rank Assessments4
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • gleisonkz Avatar
Ad