This is a code test for myself testing my front-end knowledge
I found out that i have no idea how to do
So i decide to write down all the step and try to figure out step by step
the thinking:
- Learn how to Call API and get the data correctly from omdbapi.com (which Way? fetch promise ?)
- understand the endPoint structure of an API.
- understand the paramether of API
- understand the verification of API
- try to retrive the correct data from API by combine the endpoint with type parameter(use console.log to check the data)
- try to destucture the data
- try to display the data on the screen
the Challenge :
- have difficulty on try to display both Movie + TV with 3 name
- have difficulty on bold the userInput in the movie name
solution to challenge 2 :
https://stackoverflow.com/questions/29896907/bold-part-of-string
this might help for me to bold the userInput part of the movie
function boldString(str, substr) {
var strRegExp = new RegExp(substr, 'g');
let boldName = str.replace(strRegExp, '' + substr + '');
return boldName;
}