Setup Bluetooth Low Energy In React NativeNowadays, Almost all mobile applications need Bluetooth features to connect and get data from other devices like sensors. So in this article, I will show you how to integrate Bluetooth Low Energy in your next React Native application. React Native Re...Dec 13, 2021 · 5 min readyoussefel.hashnode.dev
Find an object in an array the fast way in JavaScriptFirst Method const poeple = [ {id: 1, name: 'youssef'}, {id: 2, name: 'kamal'}, {id: 3, name: 'ossama'}, {id: 4, name: 'yassir'}, ]; const poepleById = poeple.reduce((byId, item) => { byId.set(item.id, item); return byId; }, new Map()); c...Nov 2, 2021 · 1 min readyoussefel.hashnode.dev
Array.map() from scratch in JavaScriptThe map() method creates a new array populated with the results of calling a provided function on every element in the calling array. const array1 = [1, 4, 9, 16]; // pass a function to map const map1 = array1.map(x => x * 2); console.log(map1); //...Aug 27, 2021 · 1 min readyoussefel.hashnode.dev