Open abdhalees opened 7 years ago
we didn't make a separate file or xhr request because we only use it once and its not generic, but sure we will separate it and make it more generic by adding "request method as an argument for example", thank you Abed ^^
It's always better to make separate files for functions you might use more than once, in https://github.com/FACG2/getGitHub/blob/master/public/js/index.js#L41 you are making a post http request from the same file you are manipulating the dom. Maybe it's better to make a request.js file with a function that has 2 arguments for the url and the method.