What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-27 18:30:09
validar si un numero es par javascript map
// Return a new array where even numbers are multiplied by 2 let arr = [1, 2, 3, 4, 5, 6, 7] function consoleEven(arr) { let data = arr.map((num) => (num % 2 === 0 ? num * 2 : num * 1)) console.log(data) // [1, 4, 3, 8, 5, 12, 7] } // ? is... Add solution -
Html 2022-03-24 15:55:29
google map html
<script> function myMap() { var mapProp= { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, }; var map = new google.maps.Map(document.getElementById("googleMap"),mapProp); } </script> <script src="[Google API ... Add solution -
Other 2022-03-22 09:35:47
filter return item name
Use .filter when you want to get the whole object(s) that match the expected property or properties. Use .map when you have an array of things and want to do some operation on those things and get the result. The challenge is to get all of the messages... Add solution -
Other 2022-03-20 05:45:14
tab controller
class MyTabbedPage extends StatefulWidget { const MyTabbedPage({ Key? key }) : super(key: key); @override _MyTabbedPageState createState() => _MyTabbedPageState(); } class _MyTabbedPageState extends State<MyTabbedPage> with SingleTickerPro... Add solution -
Javascript 2022-03-19 17:25:26
sorting of categories and subcategories in js
function iterative(categories, parentCategory, level = 0) { return categories .filter((category) => parentCategory ? category.parent === parentCategory : !category.parent) .map(category => { category.level = level; return cat... Add solution -
Java 2022-03-18 20:30:06
how to set username, roles, admin in jwt claims example coding in java
public String createToken(String username, List<Role> roles) { Claims claims = Jwts.claims().setSubject(username); claims.put("auth", roles.stream().map(s -> new SimpleGrantedAuthority(s.getAuthority())).filter(Objects::nonNull... Add solution