Code optimization
This commit is contained in:
@@ -1,13 +1,6 @@
|
||||
|
||||
function sendData(naam, score) {
|
||||
const request = ( url, params = {}) => {
|
||||
url += '?' + ( new URLSearchParams( params ) ).toString();
|
||||
fetch( url );
|
||||
};
|
||||
const get = ( url, params ) => request( url, params);
|
||||
|
||||
get('https://oege.ie.hva.nl/~hossan/postData.php', { name: naam, score: score } );
|
||||
|
||||
fetch (`https://oege.ie.hva.nl/~hossan/postData.php?name=${naam}&score=${score}`)
|
||||
}
|
||||
|
||||
function getData(name){
|
||||
|
Reference in New Issue
Block a user