Weight Mass Gravity Calculator

Weight Mass Gravity Calculator: Calculate Force of Gravity Accurately :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –label-color: #555; –border-color: #ccc; –shadow-color: rgba(0, 0, 0, 0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–background-color); color: var(–text-color); line-height: 1.6; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; } .container { width: 100%; max-width: 960px; margin: 20px 0; padding: 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); } header { width: 100%; background-color: var(–primary-color); color: #fff; padding: 20px 0; text-align: center; margin-bottom: 20px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; } header h1 { margin: 0; font-size: 2.5em; } .calculator-section { margin-bottom: 40px; padding: 30px; border: 1px solid var(–border-color); border-radius: 8px; background-color: #fdfdfd; } .calculator-section h2 { text-align: center; color: var(–primary-color); margin-top: 0; margin-bottom: 25px; } .input-group { margin-bottom: 20px; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(–label-color); } .input-group input[type="number"], .input-group select { width: calc(100% – 20px); padding: 12px 10px; border: 1px solid var(–border-color); border-radius: 4px; font-size: 1em; box-sizing: border-box; } .input-group input[type="number"]:focus, .input-group select:focus { border-color: var(–primary-color); outline: none; box-shadow: 0 0 0 2px rgba(0, 74, 153, 0.2); } .input-group .helper-text { font-size: 0.85em; color: var(–label-color); margin-top: 5px; display: block; } .error-message { color: #dc3545; font-size: 0.85em; margin-top: 5px; min-height: 1.2em; } .button-group { text-align: center; margin-top: 30px; } .btn { padding: 12px 25px; margin: 0 10px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; transition: background-color 0.3s ease; } .btn-primary { background-color: var(–primary-color); color: white; } .btn-primary:hover { background-color: #003366; } .btn-secondary { background-color: #6c757d; color: white; } .btn-secondary:hover { background-color: #5a6268; } .btn-success { background-color: var(–success-color); color: white; } .btn-success:hover { background-color: #218838; } #result-container { margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: #eef7ff; text-align: center; } #result-container h3 { margin-top: 0; color: var(–primary-color); font-size: 1.4em; } #main-result { font-size: 2.5em; font-weight: bold; color: var(–success-color); margin: 10px 0 20px 0; display: block; } .intermediate-results div { margin-bottom: 10px; font-size: 1.1em; } .intermediate-results span { font-weight: bold; color: var(–primary-color); } .formula-explanation { font-size: 0.9em; color: #666; margin-top: 15px; border-top: 1px dashed #ccc; padding-top: 15px; } table { width: 100%; border-collapse: collapse; margin-top: 20px; } th, td { border: 1px solid var(–border-color); padding: 10px; text-align: left; } th { background-color: var(–primary-color); color: white; } td { background-color: #f8f9fa; } caption { font-weight: bold; margin-bottom: 10px; color: var(–text-color); text-align: left; font-size: 1.1em; } .chart-container { margin-top: 30px; padding: 20px; border: 1px solid var(–border-color); border-radius: 8px; background-color: #fff; text-align: center; } .chart-container canvas { max-width: 100%; height: auto; } .chart-caption { font-size: 0.9em; color: #666; margin-top: 10px; } .article-content { margin-top: 40px; padding: 30px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); } .article-content h2 { color: var(–primary-color); margin-top: 30px; margin-bottom: 15px; border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; } .article-content h3 { color: var(–primary-color); margin-top: 20px; margin-bottom: 10px; } .article-content p, .article-content ul, .article-content ol { margin-bottom: 15px; } .article-content ul, .article-content ol { padding-left: 25px; } .article-content li { margin-bottom: 8px; } .article-content strong { color: var(–primary-color); } .article-content .variable-table { width: 100%; border-collapse: collapse; margin-top: 15px; margin-bottom: 20px; } .article-content .variable-table th, .article-content .variable-table td { border: 1px solid var(–border-color); padding: 10px; text-align: left; } .article-content .variable-table th { background-color: var(–primary-color); color: white; } .article-content .variable-table td { background-color: #f8f9fa; } .article-content .faq-item { margin-bottom: 20px; } .article-content .faq-question { font-weight: bold; color: var(–primary-color); margin-bottom: 5px; cursor: pointer; } .article-content .faq-answer { display: none; padding-left: 15px; border-left: 2px solid var(–primary-color); margin-top: 5px; } .article-content .internal-links-section { margin-top: 30px; padding-top: 20px; border-top: 1px dashed var(–border-color); } .article-content .internal-links-section h3 { margin-bottom: 15px; } .article-content .internal-links-section ul { list-style: none; padding: 0; } .article-content .internal-links-section li { margin-bottom: 10px; } .article-content .internal-links-section a { color: var(–primary-color); text-decoration: none; font-weight: bold; } .article-content .internal-links-section a:hover { text-decoration: underline; } .article-content .internal-links-section p { font-size: 0.9em; color: #555; } /* Responsive adjustments */ @media (max-width: 768px) { .container { margin: 10px 0; padding: 15px; } header h1 { font-size: 1.8em; } .calculator-section, .article-content { padding: 20px; } .btn { padding: 10px 18px; font-size: 0.95em; margin: 5px 3px; } #main-result { font-size: 2em; } }

Weight Mass Gravity Calculator

Calculate the Force of Gravity

Enter the mass of the object in kilograms.
Enter the gravitational acceleration (e.g., 9.81 m/s² for Earth).

Calculated Weight (Force)

Intermediate Values:

Mass: — kg
Gravitational Acceleration: — m/s²
Units: Newtons (N)

Weight (Force) is calculated by multiplying the object's mass by the local gravitational acceleration. Formula: Weight = Mass × Gravity.

Weight vs. Mass at Earth's Gravity

Visualizing how weight changes with mass under constant Earth gravity (9.81 m/s²).
Weight Calculation Examples
Object Mass (kg) Gravitational Acceleration (m/s²) Calculated Weight (N)

Weight Mass Gravity Calculator: Understanding the Force of Gravity

The relationship between mass, gravity, and weight is fundamental to understanding physics and how objects behave in the universe. Our Weight Mass Gravity Calculator is designed to demystify these concepts, providing clear calculations and explanations for everyone from students to curious enthusiasts. This tool helps you accurately determine the force of gravity (weight) acting on an object, given its mass and the gravitational acceleration of its location. Understanding the weight mass gravity calculator is key to grasping basic physics principles.

What is a Weight Mass Gravity Calculator?

A Weight Mass Gravity Calculator is an online tool that computes the force experienced by an object due to gravity. It leverages the fundamental physics equation that defines weight. This calculator is particularly useful for educators, students, and anyone needing to perform quick physics calculations without complex manual computations. It helps visualize how gravity affects objects differently depending on their mass and the strength of the gravitational field they are in.

Who should use it?

  • Students: For physics homework, understanding forces, and preparing for exams.
  • Educators: To demonstrate gravitational concepts in classrooms or online lessons.
  • Hobbyists: Those interested in space, astronomy, or engineering who need to perform related calculations.
  • Anyone curious: If you've ever wondered how much you would "weigh" on another planet, this calculator provides the foundation.

Common misconceptions:

  • Weight vs. Mass: Many people use "weight" and "mass" interchangeably. Mass is a measure of the amount of matter in an object, while weight is the force of gravity acting on that mass. Your mass remains constant, but your weight changes depending on gravity.
  • Constant Gravity: The assumption that gravity is constant everywhere. Gravitational acceleration varies significantly across celestial bodies and even slightly on Earth's surface.

Weight Mass Gravity Calculator Formula and Mathematical Explanation

The core of the Weight Mass Gravity Calculator lies in Newton's second law of motion, specifically applied to the force of gravity. The formula is elegantly simple:

Weight = Mass × Gravitational Acceleration

Let's break down the variables:

  • Weight (W): This is the force exerted on an object by gravity. It's typically measured in Newtons (N) in the International System of Units (SI). Weight is a vector quantity, meaning it has both magnitude and direction (always downwards, towards the center of the gravitational source).
  • Mass (m): This is an intrinsic property of an object, representing the amount of "stuff" it contains. It is measured in kilograms (kg) in SI units. Mass is a scalar quantity and is constant regardless of location.
  • Gravitational Acceleration (g): This represents the rate at which an object accelerates due to gravity. It is influenced by the mass and radius of the celestial body exerting the gravitational pull. On Earth's surface, it's approximately 9.81 m/s². Different planets, moons, and even altitudes will have different 'g' values.

The Weight Mass Gravity Calculator directly implements this formula. When you input the mass of an object and the gravitational acceleration of a specific location, the calculator multiplies these two values to output the resulting weight.

Variables in the Weight Calculation
Variable Meaning Unit (SI) Typical Range / Value
Mass (m) Amount of matter in an object Kilograms (kg) > 0 kg (e.g., 10 kg, 70 kg, 500 kg)
Gravitational Acceleration (g) Acceleration due to gravity at a location Meters per second squared (m/s²) ~0.16 on Moon, ~9.81 on Earth, ~24.8 on Jupiter, ~0 on deep space
Weight (W) Force of gravity acting on the mass Newtons (N) Calculated value (e.g., 98.1 N on Earth for 10 kg)

Practical Examples (Real-World Use Cases)

Let's explore how the Weight Mass Gravity Calculator can be applied:

Example 1: An Astronaut on the Moon

An astronaut weighs 70 kg on Earth. We want to know their weight on the Moon. The Moon's gravitational acceleration is approximately 1.62 m/s².

  • Input Mass: 70 kg
  • Input Gravitational Acceleration: 1.62 m/s²
  • Calculation: Weight = 70 kg × 1.62 m/s² = 113.4 N

Interpretation: The astronaut, who has a mass of 70 kg, experiences a force of 113.4 Newtons on the Moon. This is significantly less than their weight on Earth (70 kg * 9.81 m/s² = 686.7 N), which is why astronauts can jump much higher on the lunar surface.

Example 2: A Scientific Experiment Payload on Mars

A scientific instrument with a mass of 15 kg is being sent to Mars. The gravitational acceleration on Mars is approximately 3.71 m/s².

  • Input Mass: 15 kg
  • Input Gravitational Acceleration: 3.71 m/s²
  • Calculation: Weight = 15 kg × 3.71 m/s² = 55.65 N

Interpretation: The instrument will exert a force of 55.65 Newtons on the Martian surface. This calculation is crucial for designing landing gear and structural supports that can withstand the gravitational forces experienced on Mars, which are roughly 38% of Earth's gravity.

How to Use This Weight Mass Gravity Calculator

Using the Weight Mass Gravity Calculator is straightforward. Follow these simple steps:

  1. Enter the Mass: In the "Mass of Object (kg)" field, input the mass of the object you are interested in. Ensure the value is in kilograms.
  2. Enter Gravitational Acceleration: In the "Gravitational Acceleration (m/s²)" field, input the gravitational acceleration for the location. Use 9.81 m/s² for Earth, or consult astronomical data for other celestial bodies.
  3. Click Calculate: Press the "Calculate Weight" button.

How to read results:

  • The Main Result displayed prominently is the calculated weight (force) in Newtons (N).
  • The Intermediate Values show the inputs you provided (Mass and Gravitational Acceleration) and the units for the result.
  • The Formula Explanation reiterates the basic equation used: Weight = Mass × Gravity.

Decision-making guidance: This calculator helps in preliminary design phases, educational demonstrations, or simply satisfying curiosity about gravitational forces. For engineering applications, always use precise, officially recognized gravitational values and consider safety margins.

Key Factors That Affect Weight Results

While the formula W=mg is simple, several factors influence the inputs and thus the final weight calculation:

  1. Location's Gravitational Field Strength (g): This is the most significant factor. Gravity varies based on the mass and density of the celestial body. Being on Jupiter results in a much higher 'g' than on the Moon, leading to greater weight for the same mass.
  2. Altitude: Gravitational pull decreases with distance from the center of a celestial body. While the change is negligible for everyday purposes on Earth, it becomes significant for satellites in orbit or calculations involving different altitudes on planets.
  3. Mass of the Object (m): A larger mass directly leads to a larger weight, assuming constant gravity. A person weighing 100 kg on Earth will weigh more than someone weighing 50 kg on Earth.
  4. Rotation of the Celestial Body: The rotation of a planet can slightly reduce the *apparent* weight. This is because the centrifugal effect of rotation counteracts gravity. This effect is most pronounced at the equator and zero at the poles. Our calculator uses the standard 'g' which often accounts for this.
  5. Variations in Earth's Gravity: Even on Earth, 'g' is not perfectly uniform. It varies slightly with latitude (due to Earth's oblateness and rotation) and with geological density variations beneath the surface. For highly precise measurements, these nuances matter.
  6. Misconceptions about Units: Confusing mass (kg) with weight (N) is common. The calculator clarifies this by always outputting force in Newtons (N) and showing mass in kilograms (kg).

Frequently Asked Questions (FAQ)

Q1: What's the difference between mass and weight?
Mass is the amount of matter in an object and is constant everywhere. Weight is the force of gravity acting on that mass, and it changes depending on the gravitational field strength. Our Weight Mass Gravity Calculator helps illustrate this by showing how weight changes if you alter the gravitational acceleration while keeping mass constant.
Q2: Is the gravitational acceleration 'g' always 9.81 m/s²?
No, 9.81 m/s² is the approximate average gravitational acceleration on Earth's surface. It varies slightly by location. For other celestial bodies like the Moon or Mars, 'g' is significantly different. You can input these specific values into the calculator.
Q3: Can I use this calculator to find my weight on other planets?
Yes! By inputting your mass (in kg) and the known gravitational acceleration for planets like Mars (~3.71 m/s²), Jupiter (~24.8 m/s²), or Saturn (~10.4 m/s²), you can estimate your weight there.
Q4: What units does the calculator use?
The calculator expects mass in kilograms (kg) and gravitational acceleration in meters per second squared (m/s²). The output, Weight, is always in Newtons (N), which is the standard unit of force.
Q5: What happens if I enter a negative mass or gravity value?
The calculator includes basic validation to prevent negative inputs for mass and gravity, as these are physically nonsensical in this context. Entering invalid data will trigger an error message.
Q6: How does altitude affect weight?
Weight decreases as altitude increases because gravitational pull weakens with distance from the center of a planet. While our calculator uses a standard 'g' value for a specific location (like Earth's surface), for extreme altitudes, a more complex calculation involving distance from the planet's center would be needed.
Q7: Does the rotation of the Earth affect my weight?
Yes, Earth's rotation creates a centrifugal effect that slightly counteracts gravity, reducing apparent weight, especially at the equator. Standard 'g' values usually account for this average effect. The formula explanation covers the basic principle.
Q8: Is weight the same as force?
Yes, in physics, weight is specifically defined as the force of gravity acting upon an object. So, weight is a type of force. Our Weight Mass Gravity Calculator calculates this specific force.
var chartInstance = null; function calculateWeight() { var massInput = document.getElementById('mass'); var gravityInput = document.getElementById('gravity'); var massError = document.getElementById('mass-error'); var gravityError = document.getElementById('gravity-error'); var mainResultDiv = document.getElementById('main-result'); var intermediateMassDiv = document.getElementById('intermediate-mass'); var intermediateGravityDiv = document.getElementById('intermediate-gravity'); var intermediateUnitsDiv = document.getElementById('intermediate-units'); var mass = parseFloat(massInput.value); var gravity = parseFloat(gravityInput.value); // Reset errors massError.textContent = "; gravityError.textContent = "; mainResultDiv.textContent = '–'; var isValid = true; // Validate mass if (isNaN(mass) || mass <= 0) { massError.textContent = 'Please enter a valid positive number for mass.'; isValid = false; } // Validate gravity if (isNaN(gravity) || gravity < 0) { // Allow 0 gravity for deep space scenario gravityError.textContent = 'Please enter a valid non-negative number for gravitational acceleration.'; isValid = false; } if (isValid) { var weight = mass * gravity; mainResultDiv.textContent = weight.toFixed(2) + ' N'; intermediateMassDiv.textContent = 'Mass: ' + mass.toFixed(2) + ' kg'; intermediateGravityDiv.textContent = 'Gravitational Acceleration: ' + gravity.toFixed(2) + ' m/s²'; intermediateUnitsDiv.textContent = 'Units: Newtons (N)'; updateChart(mass, gravity); updateTable(mass, gravity, weight.toFixed(2)); } else { // Clear intermediate results if invalid intermediateMassDiv.textContent = 'Mass: — kg'; intermediateGravityDiv.textContent = 'Gravitational Acceleration: — m/s²'; intermediateUnitsDiv.textContent = 'Units: –'; } } function resetCalculator() { document.getElementById('mass').value = '10'; document.getElementById('gravity').value = '9.81'; document.getElementById('mass-error').textContent = ''; document.getElementById('gravity-error').textContent = ''; document.getElementById('main-result').textContent = '–'; document.getElementById('intermediate-mass').textContent = 'Mass: — kg'; document.getElementById('intermediate-gravity').textContent = 'Gravitational Acceleration: — m/s²'; document.getElementById('intermediate-units').textContent = 'Units: –'; if (chartInstance) { chartInstance.destroy(); chartInstance = null; } populateChartDefaults(); // Re-populate with defaults populateTableDefaults(); // Re-populate with defaults } function copyResults() { var mainResultText = document.getElementById('main-result').textContent; var intermediateMassText = document.getElementById('intermediate-mass').textContent; var intermediateGravityText = document.getElementById('intermediate-gravity').textContent; var intermediateUnitsText = document.getElementById('intermediate-units').textContent; var formulaText = "Formula: Weight = Mass × Gravity"; if (mainResultText === '–') { alert("No results to copy yet. Please calculate first."); return; } var textToCopy = "Weight Mass Gravity Calculation Results:\n\n"; textToCopy += "Main Result: " + mainResultText + "\n"; textToCopy += "——————–\n"; textToCopy += intermediateMassText + "\n"; textToCopy += intermediateGravityText + "\n"; textToCopy += intermediateUnitsText + "\n"; textToCopy += "——————–\n"; textToCopy += formulaText; navigator.clipboard.writeText(textToCopy).then(function() { alert('Results copied to clipboard!'); }).catch(function(err) { console.error('Failed to copy: ', err); prompt('Copy these results manually:', textToCopy); }); } function updateChart(currentMass, currentGravity) { var ctx = document.getElementById('weightMassChart').getContext('2d'); // Destroy previous chart instance if it exists if (chartInstance) { chartInstance.destroy(); } var masses = [5, 10, 20, 50, 100, 150]; // Example masses var weightsOnEarth = masses.map(function(m) { return m * 9.81; }); var weightsOnMars = masses.map(function(m) { return m * 3.71; }); // Example Mars gravity chartInstance = new Chart(ctx, { type: 'line', data: { labels: masses.map(function(m) { return m + ' kg'; }), datasets: [{ label: 'Weight on Earth (9.81 m/s²)', data: weightsOnEarth, borderColor: 'rgb(75, 192, 192)', tension: 0.1, fill: false }, { label: 'Weight on Mars (3.71 m/s²)', data: weightsOnMars, borderColor: 'rgb(255, 99, 132)', tension: 0.1, fill: false }] }, options: { responsive: true, maintainAspectRatio: true, scales: { y: { beginAtZero: true, title: { display: true, text: 'Weight (Newtons)' } }, x: { title: { display: true, text: 'Mass (kg)' } } }, plugins: { legend: { position: 'top', }, title: { display: true, text: 'Weight Comparison Across Gravitational Fields' } } } }); } function populateChartDefaults() { var ctx = document.getElementById('weightMassChart').getContext('2d'); if (chartInstance) { chartInstance.destroy(); } var masses = [5, 10, 20, 50, 100, 150]; var weightsOnEarth = masses.map(function(m) { return m * 9.81; }); var weightsOnMars = masses.map(function(m) { return m * 3.71; }); chartInstance = new Chart(ctx, { type: 'line', data: { labels: masses.map(function(m) { return m + ' kg'; }), datasets: [{ label: 'Weight on Earth (9.81 m/s²)', data: weightsOnEarth, borderColor: 'rgb(75, 192, 192)', tension: 0.1, fill: false }, { label: 'Weight on Mars (3.71 m/s²)', data: weightsOnMars, borderColor: 'rgb(255, 99, 132)', tension: 0.1, fill: false }] }, options: { responsive: true, maintainAspectRatio: true, scales: { y: { beginAtZero: true, title: { display: true, text: 'Weight (Newtons)' } }, x: { title: { display: true, text: 'Mass (kg)' } } }, plugins: { legend: { position: 'top', }, title: { display: true, text: 'Weight Comparison Across Gravitational Fields' } } } }); } function updateTable(currentMass, currentGravity, calculatedWeight) { var tbody = document.getElementById('examples-tbody'); tbody.innerHTML = ''; // Clear existing rows // Add current calculation as a row var row = tbody.insertRow(); row.insertCell(0).textContent = 'Current Calculation'; row.insertCell(1).textContent = currentMass.toFixed(2) + ' kg'; row.insertCell(2).textContent = currentGravity.toFixed(2) + ' m/s²'; row.insertCell(3).textContent = calculatedWeight + ' N'; // Add example rows var example1Mass = 70; var example1Gravity = 1.62; // Moon var example1Weight = (example1Mass * example1Gravity).toFixed(2); row = tbody.insertRow(); row.insertCell(0).textContent = 'Astronaut on Moon'; row.insertCell(1).textContent = example1Mass + ' kg'; row.insertCell(2).textContent = example1Gravity + ' m/s²'; row.insertCell(3).textContent = example1Weight + ' N'; var example2Mass = 15; var example2Gravity = 3.71; // Mars var example2Weight = (example2Mass * example2Gravity).toFixed(2); row = tbody.insertRow(); row.insertCell(0).textContent = 'Payload on Mars'; row.insertCell(1).textContent = example2Mass + ' kg'; row.insertCell(2).textContent = example2Gravity + ' m/s²'; row.insertCell(3).textContent = example2Weight + ' N'; var example3Mass = 50; var example3Gravity = 24.8; // Jupiter var example3Weight = (example3Mass * example3Gravity).toFixed(2); row = tbody.insertRow(); row.insertCell(0).textContent = 'Person on Jupiter'; row.insertCell(1).textContent = example3Mass + ' kg'; row.insertCell(2).textContent = example3Gravity + ' m/s²'; row.insertCell(3).textContent = example3Weight + ' N'; } function populateTableDefaults() { var tbody = document.getElementById('examples-tbody'); tbody.innerHTML = ''; // Clear existing rows // Add default example rows var example1Mass = 70; var example1Gravity = 1.62; // Moon var example1Weight = (example1Mass * example1Gravity).toFixed(2); var row = tbody.insertRow(); row.insertCell(0).textContent = 'Astronaut on Moon'; row.insertCell(1).textContent = example1Mass + ' kg'; row.insertCell(2).textContent = example1Gravity + ' m/s²'; row.insertCell(3).textContent = example1Weight + ' N'; var example2Mass = 15; var example2Gravity = 3.71; // Mars var example2Weight = (example2Mass * example2Gravity).toFixed(2); row = tbody.insertRow(); row.insertCell(0).textContent = 'Payload on Mars'; row.insertCell(1).textContent = example2Mass + ' kg'; row.insertCell(2).textContent = example2Gravity + ' m/s²'; row.insertCell(3).textContent = example2Weight + ' N'; var example3Mass = 50; var example3Gravity = 24.8; // Jupiter var example3Weight = (example3Mass * example3Gravity).toFixed(2); row = tbody.insertRow(); row.insertCell(0).textContent = 'Person on Jupiter'; row.insertCell(1).textContent = example3Mass + ' kg'; row.insertCell(2).textContent = example3Gravity + ' m/s²'; row.insertCell(3).textContent = example3Weight + ' N'; } // Initial calculations and chart population on page load document.addEventListener('DOMContentLoaded', function() { calculateWeight(); populateChartDefaults(); populateTableDefaults(); // FAQ toggles var faqQuestions = document.querySelectorAll('.faq-question'); for (var i = 0; i < faqQuestions.length; i++) { faqQuestions[i].addEventListener('click', function() { var answer = this.nextElementSibling; if (answer.style.display === 'block') { answer.style.display = 'none'; } else { answer.style.display = 'block'; } }); } });

Leave a Comment