Update Pickup Point
Given a previous pickup point in the prefilled code, and updated pickup point
<!DOCTYPE html>
<html>
<head>
<script>
function updatePickupPoint(area, city) {
return {
area: area,
city: city,
getPoint() {
return area + ' ' + city;
}
}
}
var area = prompt("Enter the area: ");
var city = prompt("Enter the city: ");
var pp = updatePickupPoint(area, city)
window.onload = function() {
document.getElementById("getPoint").innerHTML =pp.getPoint();
};
</script>
</head>
<body>
<p id="getPoint"></p>
</body>
</html>
Comments
Leave a comment