skip to Main Content

Javascript – how to optimize fetching data from JSON

Is there any solutions of fetching data more fast and determine data length without loading all JSON data. Here is code const url = "https://jsonplaceholder.typicode.com/comments"; const [data, setData] = useState([]); const [colorScheme, setColorScheme] = useState(true); const [loader, setLoader] = useState(true);…

VIEW QUESTION

Javascript – Search algorithms

In javascript, I want to have a function with this declaration: function sumOfTwoItemExist(arr:number[],total:number)=>boolean the first parameter would be an array of numbers and the 2nd would be a number, now I want to return true if the sum of any…

VIEW QUESTION
Back To Top
Search