JSFiddle - React, Tailwind, and code Playground
by Maxim_Wolf
JavaScript
const myObj1 ={
lat:1,
lng:2,
title: 'titleherego',
};
const fun1 = (p){
const l1 = p.lat;
const l2 = p.lng;
const coords = {lat:l1, lng:l2};
l.Marker(coords);
};
const fun2 = ({lat, lng})=>{
const coords = {lat: lat, lng:lng};
l.Marker(coords);
}
const fun3 = ({lat,lng})=>{
l.Marker({lat,lng})
}
fun1(myObj1);
fun2(myObj1);
fun3(myObj1);