let country = {
get capital() {
let city = Number("London");
return {
cityString: city.toString(),
}
}
}
console.log(country);
console.log(country.capital);
console.log(country.cityString);
https://onecompiler.com/javascript/3ynjmmjp8