showing results for - "js catch rejected promise"
Bruno
13 Oct 2018
1//makeRequest returns promise using resolve(sucess)/reject(failure)
2//use .then() the first function passed in will run on sucess, 
3//the second function passed in will run on failure
4makeRequest('GET',"https://mywebsite.com").then(
5	function(r){
6		console.log("success");
7	},
8	function(r){
9		console.log("failure");
10	}
11);