Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. function fetchGetData(idUser){
  2. fetch('url?idU='+idUser)
  3. .then((response)=>console.log(response))
  4. .then((responseText)=>{
  5. if(responseText.result!='true'){
  6. console.log(responseText)
  7. return parseInt(responseText) // return the data (a number for me)
  8. }
  9. else {
  10. return 0 ;
  11. }
  12. });
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement