Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fetchGetData(idUser){
- fetch('url?idU='+idUser)
- .then((response)=>console.log(response))
- .then((responseText)=>{
- if(responseText.result!='true'){
- console.log(responseText)
- return parseInt(responseText) // return the data (a number for me)
- }
- else {
- return 0 ;
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement