Conical Shell Weight Calculator

Conical Shell Weight Calculator – Calculate Material Weight Accurately :root { –primary-color: #004a99; –secondary-color: #007bff; –success-color: #28a745; –light-gray: #f8f9fa; –dark-gray: #343a40; –white: #ffffff; –border-color: #dee2e6; –shadow-color: rgba(0, 0, 0, 0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; background-color: var(–light-gray); color: var(–dark-gray); margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; min-height: 100vh; } .container { width: 100%; max-width: 1000px; margin: 20px auto; padding: 25px; background-color: var(–white); border-radius: 8px; box-shadow: 0 4px 15px var(–shadow-color); display: flex; flex-direction: column; align-items: center; } header { text-align: center; margin-bottom: 30px; width: 100%; } h1 { color: var(–primary-color); font-size: 2.5em; margin-bottom: 10px; } header p { font-size: 1.1em; color: #555; max-width: 700px; margin: 0 auto; } .calculator-section { width: 100%; background-color: var(–white); padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); margin-bottom: 40px; display: flex; flex-direction: column; align-items: center; } .loan-calc-container { width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 20px; } .input-group { display: flex; flex-direction: column; gap: 5px; width: 100%; } .input-group label { font-weight: bold; color: var(–dark-gray); font-size: 0.95em; } .input-group input, .input-group select { padding: 12px 15px; border: 1px solid var(–border-color); border-radius: 5px; font-size: 1em; transition: border-color 0.3s ease; } .input-group input:focus, .input-group select:focus { border-color: var(–primary-color); outline: none; } .input-group .helper-text { font-size: 0.85em; color: #6c757d; margin-top: 5px; } .error-message { color: #dc3545; font-size: 0.85em; margin-top: 5px; height: 1.2em; /* Reserve space to prevent layout shifts */ } .button-group { display: flex; justify-content: center; gap: 15px; margin-top: 25px; flex-wrap: wrap; } .btn { padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; text-transform: uppercase; transition: background-color 0.3s ease, transform 0.2s ease; min-width: 150px; } .btn-primary { background-color: var(–primary-color); color: var(–white); } .btn-primary:hover { background-color: #003b7c; transform: translateY(-2px); } .btn-secondary { background-color: var(–success-color); color: var(–white); } .btn-secondary:hover { background-color: #218838; transform: translateY(-2px); } .btn-reset { background-color: #6c757d; color: var(–white); } .btn-reset:hover { background-color: #5a6268; transform: translateY(-2px); } .btn-copy { background-color: #17a2b8; color: var(–white); } .btn-copy:hover { background-color: #138496; transform: translateY(-2px); } #results-container { width: 100%; max-width: 600px; margin-top: 30px; padding: 25px; background-color: var(–primary-color); color: var(–white); border-radius: 8px; box-shadow: inset 0 0 10px rgba(0,0,0,0.2); text-align: center; } #results-container h2 { margin-top: 0; font-size: 1.8em; color: var(–white); } #results-container .main-result { font-size: 2.5em; font-weight: bold; margin: 15px 0; color: #ffdd57; /* A contrasting highlight color */ } #results-container .intermediate-results p, #results-container .formula-explanation { font-size: 1em; margin: 8px 0; color: rgba(255, 255, 255, 0.9); } #results-container .formula-explanation { margin-top: 15px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.3); font-style: italic; font-size: 0.9em; } .chart-section, .table-section { width: 100%; max-width: 700px; margin-top: 40px; padding: 30px; background-color: var(–white); border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); display: flex; flex-direction: column; align-items: center; } .chart-section h2, .table-section h2 { color: var(–primary-color); margin-top: 0; font-size: 1.8em; text-align: center; margin-bottom: 20px; } canvas { max-width: 100%; height: auto; } table { width: 100%; border-collapse: collapse; margin-top: 20px; box-shadow: 0 2px 5px var(–shadow-color); } th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(–border-color); } thead { background-color: var(–primary-color); color: var(–white); } th { font-weight: bold; } tbody tr:nth-child(even) { background-color: var(–light-gray); } tbody tr:hover { background-color: #e9ecef; } footer { text-align: center; padding: 25px; margin-top: 40px; width: 100%; background-color: var(–dark-gray); color: var(–white); font-size: 0.9em; } footer a { color: #17a2b8; text-decoration: none; } footer a:hover { text-decoration: underline; } .article-content { width: 100%; max-width: 900px; margin: 40px auto 0 auto; padding: 30px; background-color: var(–white); border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); line-height: 1.8; color: #333; } .article-content h2 { color: var(–primary-color); font-size: 2em; margin-top: 40px; margin-bottom: 15px; border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; } .article-content h3 { color: var(–secondary-color); font-size: 1.5em; margin-top: 30px; margin-bottom: 10px; } .article-content p, .article-content ul, .article-content ol { margin-bottom: 20px; font-size: 1.1em; } .article-content ul, .article-content ol { padding-left: 40px; } .article-content li { margin-bottom: 10px; } .article-content strong { color: var(–primary-color); } .article-content .faq-list { margin-top: 20px; border: 1px solid var(–border-color); border-radius: 5px; } .article-content .faq-item { padding: 15px; border-bottom: 1px solid var(–border-color); } .article-content .faq-item:last-child { border-bottom: none; } .article-content .faq-question { font-weight: bold; color: var(–secondary-color); margin-bottom: 5px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; } .article-content .faq-answer { margin-left: 10px; font-size: 0.95em; color: #555; max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; } .article-content .faq-question.active .faq-answer { max-height: 200px; /* Adjust as needed */ } .article-content .faq-question::after { content: '+'; font-size: 1.2em; transition: transform 0.3s ease; } .article-content .faq-question.active::after { content: '-'; transform: rotate(180deg); } .article-content table { margin-top: 15px; box-shadow: none; } .article-content table th, .article-content table td { padding: 10px; font-size: 0.95em; } .article-content table th { background-color: var(–light-gray); color: var(–dark-gray); } .article-content table tbody tr:nth-child(even) { background-color: inherit; } .article-content .related-links ul { list-style: none; padding: 0; } .article-content .related-links li { margin-bottom: 15px; } .article-content .related-links a { font-weight: bold; color: var(–primary-color); text-decoration: none; } .article-content .related-links a:hover { text-decoration: underline; } .article-content .related-links span { display: block; font-size: 0.9em; color: #555; margin-top: 5px; }

Conical Shell Weight Calculator

Precisely determine the material weight of any conical shell using our intuitive online tool. Essential for engineers, manufacturers, and material estimators.

The radius of the base of the cone (larger end).
The radius of the top of the cone (smaller end).
The perpendicular distance between the bases.
Density of the material (e.g., kg/m³ for steel).
Metric (kg, m) Imperial (lbs, ft)
Select units for calculation and output.

Calculation Results

Slant Height (l):

Surface Area (A):

Volume (V):

Total Weight:
Weight = Volume × Density. Volume of a conical shell is calculated considering the frustum shape.

Weight vs. Height Relationship

Visualizing how material weight changes with the height of the conical shell, keeping other dimensions constant.

Material Density Comparison

Material Density (kg/m³) Density (lb/ft³)
Steel 7850 489.4
Aluminum 2700 168.5
Copper 8960 559.3
Titanium 4500 280.9
Concrete 2400 149.8

Reference densities for common materials used in conical shell construction.

What is Conical Shell Weight Calculation?

Conical shell weight calculation refers to the process of determining the total mass of material required to construct a hollow cone, specifically a frustum (a cone with its top cut off by a plane parallel to the base). This calculation is crucial in various engineering and manufacturing fields, from aerospace and automotive to construction and product design. It involves understanding the geometry of the conical shell and the density of the material it's made from.

Who should use it?

  • Engineers: Designing structures, tanks, hoppers, or nozzles that involve conical shapes.
  • Manufacturers: Estimating material costs, production requirements, and shipping weights.
  • Procurement Specialists: Sourcing the correct amount of raw materials.
  • Students and Educators: Learning and teaching principles of solid geometry and material science.
  • Hobbyists: Projects involving conical parts, such as custom funnels or model components.

Common misconceptions include assuming a conical shell has the same volume as a cylinder of equivalent dimensions or neglecting the thickness/density of the material. The shape is a frustum, not a solid cone, and its weight depends entirely on the material's density and the shell's volume.

Conical Shell Weight Formula and Mathematical Explanation

The weight of a conical shell is calculated by first determining its volume and then multiplying that volume by the density of the material. The formula for the volume of a conical shell (or frustum) is derived from the volume of a larger cone minus the volume of a smaller, removed cone.

Volume of a Conical Shell (Frustum)

The standard formula for the volume (V) of a conical frustum is:

V = (1/3) * π * h * (R² + Rr + r²)

Where:

  • R is the radius of the larger base.
  • r is the radius of the smaller base (top).
  • h is the height of the frustum (perpendicular distance between bases).
  • π (pi) is approximately 3.14159.

Calculating Slant Height

While not directly used in the volume calculation for a frustum when height (h) is known, the slant height (l) is related and can be useful for surface area calculations. The slant height of the frustum can be calculated using the Pythagorean theorem:

l = √[ h² + (R – r)² ]

Calculating Surface Area (Lateral)

The lateral surface area (A) of the conical shell is:

A = π * (R + r) * l

Where 'l' is the slant height calculated above.

Final Weight Calculation

Once the volume (V) is known, the weight (W) is calculated as:

W = V * ρ

Where:

  • W is the total weight.
  • V is the calculated volume.
  • ρ (rho) is the density of the material.

Variables Table

Variable Meaning Unit (Metric) Unit (Imperial) Typical Range
R Outer Radius (Base) meters (m) feet (ft) 0.1 m to 100 m+
r Inner Radius (Top) meters (m) feet (ft) 0.01 m to R
h Height meters (m) feet (ft) 0.1 m to 100 m+
ρ Material Density kilograms per cubic meter (kg/m³) pounds per cubic foot (lb/ft³) 100 kg/m³ (e.g., foam) to 20,000+ kg/m³ (e.g., tungsten)
l Slant Height meters (m) feet (ft) Calculated value
A Lateral Surface Area square meters (m²) square feet (ft²) Calculated value
V Volume cubic meters (m³) cubic feet (ft³) Calculated value
W Weight kilograms (kg) pounds (lbs) Calculated value

Practical Examples (Real-World Use Cases)

Example 1: Steel Hopper Cone

A manufacturing plant uses a conical hopper to guide materials. It has an outer base radius (R) of 2 meters, a top radius (r) of 1 meter, and a height (h) of 3 meters. The hopper is made of steel with a density (ρ) of 7850 kg/m³.

  • Inputs: R=2m, r=1m, h=3m, ρ=7850 kg/m³
  • Calculations:
    • Slant Height (l) = √[ 3² + (2 – 1)² ] = √[ 9 + 1 ] = √10 ≈ 3.16 m
    • Surface Area (A) = π * (2 + 1) * 3.16 ≈ 29.77 m²
    • Volume (V) = (1/3) * π * 3 * (2² + 2*1 + 1²) = π * (4 + 2 + 1) = 7π ≈ 21.99 m³
    • Weight (W) = V * ρ = 21.99 m³ * 7850 kg/m³ ≈ 172612 kg
  • Outputs: Slant Height ≈ 3.16m, Surface Area ≈ 29.77m², Volume ≈ 21.99m³, Total Weight ≈ 172,612 kg
  • Interpretation: This substantial weight indicates the need for heavy lifting equipment during installation and maintenance. It also informs material cost calculations for this component.

Example 2: Aluminum Funnel for Industrial Use

An industrial process requires a large funnel with specific dimensions. The funnel has an outer radius (R) of 0.5 feet, a top radius (r) of 0.2 feet, and a height (h) of 1.5 feet. It's constructed from aluminum, which has a density of approximately 168.5 lb/ft³.

  • Inputs: R=0.5 ft, r=0.2 ft, h=1.5 ft, ρ=168.5 lb/ft³
  • Calculations:
    • Slant Height (l) = √[ 1.5² + (0.5 – 0.2)² ] = √[ 2.25 + 0.09 ] = √2.34 ≈ 1.53 ft
    • Surface Area (A) = π * (0.5 + 0.2) * 1.53 ≈ 3.36 ft²
    • Volume (V) = (1/3) * π * 1.5 * (0.5² + 0.5*0.2 + 0.2²) = 0.5 * π * (0.25 + 0.10 + 0.04) = 0.5 * π * 0.39 ≈ 0.613 ft³
    • Weight (W) = V * ρ = 0.613 ft³ * 168.5 lb/ft³ ≈ 103.4 lbs
  • Outputs: Slant Height ≈ 1.53 ft, Surface Area ≈ 3.36 ft², Volume ≈ 0.613 ft³, Total Weight ≈ 103.4 lbs
  • Interpretation: This weight is manageable for standard industrial handling. The calculation confirms the material choice is suitable for the required structural integrity and weight constraints.

How to Use This Conical Shell Weight Calculator

Our calculator simplifies the process of finding the weight of a conical shell. Follow these steps:

  1. Identify Dimensions: Measure or determine the Outer Radius (R), Inner Radius (r), and Height (h) of your conical shell. Ensure these are in consistent units (e.g., all meters or all feet).
  2. Determine Material Density: Find the density (ρ) of the material your shell is made from. Use the provided table for common materials or look up the specific value for your material. Ensure the density units are compatible with your chosen measurement system (e.g., kg/m³ for metric, lb/ft³ for imperial).
  3. Select Units: Choose whether you want to perform the calculation using Metric (kilograms and meters) or Imperial (pounds and feet) units. The calculator will handle conversions internally based on your selection.
  4. Input Values: Enter the values for R, r, h, and ρ into the respective fields.
  5. Validate Input: Pay attention to any error messages that appear below the input fields. Ensure all values are positive numbers.
  6. Calculate: Click the "Calculate Weight" button.

How to Read Results:

  • Intermediate Values: You'll see the calculated Slant Height, Surface Area, and Volume. These provide further insight into the shell's geometry.
  • Total Weight: The primary highlighted result shows the total calculated weight of the conical shell in your selected units (kg or lbs).
  • Formula Explanation: A brief summary of the underlying calculation is provided for clarity.

Decision-Making Guidance: Use the calculated weight to estimate material costs, plan for transportation and installation logistics, ensure structural integrity, and compare different material options. For instance, if the calculated weight exceeds handling capabilities, consider using a lighter material or redesigning the shell.

Key Factors That Affect Conical Shell Weight Results

Several factors influence the calculated weight of a conical shell. Understanding these helps in accurate estimation and design:

  1. Radii (R and r): The larger the difference between the outer and inner radii, and the larger the base radius, the greater the volume and thus the weight. These are primary geometric drivers.
  2. Height (h): A taller conical shell, even with similar radii, will have a larger volume. The height directly impacts the overall size and material usage.
  3. Material Density (ρ): This is perhaps the most significant factor after volume. A denser material (like steel) will result in a much heavier shell than a less dense material (like aluminum) for the same dimensions. Accurate density is critical.
  4. Shell Thickness: While our calculator uses the difference between outer and inner radii to implicitly define thickness for volume, in complex scenarios, a specified uniform thickness might be used with approximations. However, the R, r, h method is standard for frustums.
  5. Geometric Precision: Real-world manufacturing may lead to slight variations from perfect conical shapes. Minor imperfections might slightly alter the actual weight, though typically within acceptable tolerances.
  6. Wall Uniformity: Assuming uniform density and thickness across the entire shell is standard. Deviations, like thicker welds or varying material composition, can cause localized weight differences.
  7. Temperature Effects: Materials expand or contract with temperature changes, slightly altering their density and dimensions. For most practical applications, these effects are negligible but can be relevant in extreme environments.
  8. Attachments and Reinforcements: If the conical shell includes flanges, brackets, or stiffening ribs, these additional components will increase the total weight beyond the shell's calculated weight.

Frequently Asked Questions (FAQ)

What is the difference between a cone and a conical shell?
A cone is a solid shape tapering from a circular base to a point (apex). A conical shell, often referred to as a frustum in this context, is a hollow section of a cone, typically with the top cut off parallel to the base, having an inner and outer radius and thus a defined wall volume.
Can I calculate the weight of a full cone using this calculator?
This calculator is specifically designed for a conical shell (frustum). To calculate the weight of a full cone, you would set the inner radius (r) to 0. The formula for a full cone's volume is (1/3) * π * R² * h.
What units should I use for density?
Use units consistent with your dimensional inputs. For metric (meters), use kilograms per cubic meter (kg/m³). For imperial (feet), use pounds per cubic foot (lb/ft³). The calculator supports both systems.
How accurate is the conical shell weight calculation?
The accuracy depends on the precision of your input measurements (R, r, h) and the exact density of the material used. The geometric formulas used are mathematically exact for ideal shapes. Real-world variations might cause slight discrepancies.
What if my conical shell isn't perfectly uniform?
This calculator assumes a perfectly uniform conical frustum. If there are significant irregularities in thickness or shape, the calculated weight will be an approximation. For critical applications, consider averaging measurements or using more advanced modeling techniques.
Does the calculator account for the thickness of the material?
Yes, the volume calculation inherently accounts for thickness by using both the outer radius (R) and inner radius (r). The difference (R-r) effectively defines the radial thickness component, which, combined with height and slant angle, determines the volume.
What is the slant height and why is it calculated?
The slant height (l) is the distance along the slanted surface of the cone from the base edge to the apex (or the corresponding edge on the frustum). While not directly used in the volume calculation, it's essential for calculating the surface area of the conical shell.
Can I use this calculator for conical frustums with an inner radius larger than the outer radius?
Typically, the outer radius (R) is larger than the inner radius (r) for a standard conical shell. If r > R, it implies an inverted or unusual geometry. The formula will still compute a volume, but ensure your inputs reflect the physical reality of your object.
How does material density affect the weight?
Density is a measure of mass per unit volume. A material with higher density packs more mass into the same volume. Therefore, for identical conical shells, one made of a high-density material like lead will be significantly heavier than one made of a low-density material like plastic. Weight is directly proportional to density (Weight = Volume × Density).

Related Tools and Internal Resources

© 2023 Your Company Name. All rights reserved.

Disclaimer: This calculator provides estimates based on input values. Consult with a professional engineer for critical applications.

Contact us: support@yourcompany.com

var pi = Math.PI; var chartInstance = null; function validateInput(id, errorId, min, max) { var input = document.getElementById(id); var errorElement = document.getElementById(errorId); var value = parseFloat(input.value); var isValid = true; errorElement.textContent = "; // Clear previous error if (isNaN(value)) { errorElement.textContent = 'Please enter a valid number.'; isValid = false; } else if (value <= 0) { errorElement.textContent = 'Value must be positive.'; isValid = false; } else if (min !== undefined && value max) { errorElement.textContent = 'Value too large.'; isValid = false; } return isValid ? value : null; } function getUnitFactors() { var unitsSelect = document.getElementById('units'); var selectedUnits = unitsSelect.value; var factors = {}; if (selectedUnits === 'metric') { factors = { densityUnit: 'kg/m³', weightUnit: 'kg', lengthUnit: 'm', volumeUnit: 'm³', areaUnit: 'm²' }; } else { // imperial factors = { densityUnit: 'lb/ft³', weightUnit: 'lbs', lengthUnit: 'ft', volumeUnit: 'ft³', areaUnit: 'ft²' }; } return factors; } function updateChart() { var R = parseFloat(document.getElementById('outerRadius').value); var r = parseFloat(document.getElementById('innerRadius').value); var h_input = parseFloat(document.getElementById('height').value); var rho = parseFloat(document.getElementById('materialDensity').value); var units = document.getElementById('units').value; if (isNaN(R) || isNaN(r) || isNaN(h_input) || isNaN(rho) || R <= 0 || r <= 0 || h_input <= 0 || rho = R) { // Don't update chart if inputs are invalid return; } var heights = []; var weights = []; var originalHeight = h_input; var step = originalHeight / 10; // Calculate for 10 points for (var i = 1; i = R if (R_val !== null && r_val !== null && r_val >= R_val) { document.getElementById('innerRadiusError').textContent = 'Inner radius must be smaller than outer radius.'; return; } if (R_val === null || r_val === null || h_val === null || rho_val === null) { // Set placeholder values if calculation cannot proceed document.getElementById('slantHeight').textContent = '–'; document.getElementById('surfaceArea').textContent = '–'; document.getElementById('volume').textContent = '–'; document.getElementById('totalWeight').textContent = '–'; return; } // Calculations var slantHeight = Math.sqrt(Math.pow(h_val, 2) + Math.pow(R_val – r_val, 2)); var surfaceArea = pi * (R_val + r_val) * slantHeight; var volume = (1.0/3.0) * pi * h_val * (Math.pow(R_val, 2) + R_val * r_val + Math.pow(r_val, 2)); var weight = volume * rho_val; // Update results display document.getElementById('slantHeight').textContent = slantHeight.toFixed(3) + ' ' + factors.lengthUnit; document.getElementById('surfaceArea').textContent = surfaceArea.toFixed(3) + ' ' + factors.areaUnit; document.getElementById('volume').textContent = volume.toFixed(3) + ' ' + factors.volumeUnit; document.getElementById('totalWeight').textContent = weight.toFixed(2) + ' ' + factors.weightUnit; updateChart(); // Update the chart } function resetCalculator() { document.getElementById('outerRadius').value = '10'; document.getElementById('innerRadius').value = '8'; document.getElementById('height').value = '15'; document.getElementById('materialDensity').value = '7850'; // Default to steel kg/m³ document.getElementById('units').value = 'metric'; // Clear errors document.getElementById('outerRadiusError').textContent = "; document.getElementById('innerRadiusError').textContent = "; document.getElementById('heightError').textContent = "; document.getElementById('materialDensityError').textContent = "; calculateWeight(); // Recalculate with default values } function copyResults() { var R_input = document.getElementById('outerRadius'); var r_input = document.getElementById('innerRadius'); var h_input = document.getElementById('height'); var rho_input = document.getElementById('materialDensity'); var unitsSelect = document.getElementById('units'); var slantHeight = document.getElementById('slantHeight').textContent; var surfaceArea = document.getElementById('surfaceArea').textContent; var volume = document.getElementById('volume').textContent; var totalWeight = document.getElementById('totalWeight').textContent; var factors = getUnitFactors(); var resultText = "— Conical Shell Weight Calculation —" + "\n\n"; resultText += "Inputs:" + "\n"; resultText += "- Outer Radius (R): " + R_input.value + " " + factors.lengthUnit + "\n"; resultText += "- Inner Radius (r): " + r_input.value + " " + factors.lengthUnit + "\n"; resultText += "- Height (h): " + h_input.value + " " + factors.lengthUnit + "\n"; resultText += "- Material Density (ρ): " + rho_input.value + " " + factors.densityUnit + "\n"; resultText += "- Units: " + (unitsSelect.value === 'metric' ? 'Metric' : 'Imperial') + "\n\n"; resultText += "Results:" + "\n"; resultText += "- Slant Height (l): " + slantHeight + "\n"; resultText += "- Surface Area (A): " + surfaceArea + "\n"; resultText += "- Volume (V): " + volume + "\n"; resultText += "- Total Weight (W): " + totalWeight + "\n\n"; resultText += "Formula Used: Weight = Volume × Density. Volume of conical shell (frustum) = (1/3) * π * h * (R² + Rr + r²)"; var textArea = document.createElement("textarea"); textArea.value = resultText; document.body.appendChild(textArea); textArea.select(); document.execCommand("copy"); textArea.remove(); alert("Results copied to clipboard!"); } // Initialize calculator on load window.onload = function() { // Add event listeners for real-time updates document.getElementById('outerRadius').addEventListener('input', calculateWeight); document.getElementById('innerRadius').addEventListener('input', calculateWeight); document.getElementById('height').addEventListener('input', calculateWeight); document.getElementById('materialDensity').addEventListener('input', calculateWeight); document.getElementById('units').addEventListener('change', calculateWeight); resetCalculator(); // Set default values and perform initial calculation // FAQ toggles var faqQuestions = document.querySelectorAll('.faq-question'); faqQuestions.forEach(function(question) { question.addEventListener('click', function() { this.classList.toggle('active'); }); }); };

Leave a Comment