Skip to content

odilbek17/crud-functions-with-fetch-timer-interval-start-and-stop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

function ekranShow(data) {

data.forEach((elelment) => {
    console.log(elelment);

}); }

fetch("https://fakestoreapi.com/products")
.then((j) => j.json())
.then((ij) => ekranShow(ij))
.catch((err) => console.log(err));

function yangiTavarr(Tavar){
    fetch("https://fakestoreapi.com/products", {
        method: "POST",
        headers: {
            "Content-Type": "application/json"
        },
        body: JSON.stringify(Tavar)
    })
}
yangiTavarr({title: "3ta function", price: 100, description: "3ta function haqida", image: "https://fakestoreapi.com/img/81fPKd-2AYL._AC_SL1500_.jpg", category: "electronics"})

function changeTavar(data, soni){
    fetch(`https://fakestoreapi.com/products/${soni}`), {
        method: "DELETE",
    }
}
changeTavar(3);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published