How to Calculate Your Protein Needs per Kilogram Body Weight

Calculate Your Protein Needs Per Kilogram Body Weight :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ddd; –card-background: #fff; –error-color: #dc3545; } 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: 20px; display: flex; justify-content: center; } .container { max-width: 1000px; width: 100%; background-color: var(–card-background); padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); margin: 0 auto; } h1, h2, h3 { color: var(–primary-color); text-align: center; margin-bottom: 20px; } h1 { font-size: 2.5em; } h2 { font-size: 1.8em; margin-top: 30px; border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; } h3 { font-size: 1.4em; margin-top: 25px; } .sub-heading { text-align: left; margin-top: 20px; color: #555; } .calculator-wrapper { background-color: var(–card-background); padding: 25px; border-radius: 8px; margin-bottom: 30px; border: 1px solid var(–border-color); } .input-group { margin-bottom: 20px; padding-bottom: 15px; position: relative; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #555; } .input-group input[type="number"], .input-group select { width: calc(100% – 22px); /* Account for padding and border */ padding: 10px; border: 1px solid var(–border-color); border-radius: 5px; font-size: 1em; box-sizing: border-box; transition: border-color 0.3s ease; } .input-group input[type="number"]:focus, .input-group select:focus { border-color: var(–primary-color); outline: none; } .input-group .helper-text { font-size: 0.85em; color: #777; margin-top: 5px; display: block; } .error-message { color: var(–error-color); font-size: 0.8em; margin-top: 5px; display: none; /* Hidden by default */ } .input-group.error input[type="number"], .input-group.error select { border-color: var(–error-color); } .button-group { display: flex; justify-content: space-between; margin-top: 25px; gap: 10px; } .button-group button, .button-group a.button { flex: 1; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; transition: background-color 0.3s ease, transform 0.2s ease; text-decoration: none; display: inline-block; text-align: center; } .btn-calculate { background-color: var(–primary-color); color: white; } .btn-calculate:hover { background-color: #003366; transform: translateY(-2px); } .btn-reset { background-color: #6c757d; color: white; } .btn-reset:hover { background-color: #5a6268; transform: translateY(-2px); } .btn-copy { background-color: #17a2b8; color: white; } .btn-copy:hover { background-color: #117a8b; transform: translateY(-2px); } #results { background-color: var(–primary-color); color: white; padding: 25px; border-radius: 8px; margin-top: 30px; text-align: center; box-shadow: inset 0 2px 5px rgba(0,0,0,0.2); } #results .main-result { font-size: 2.5em; font-weight: bold; margin-bottom: 15px; display: block; } #results .result-label { font-size: 1.1em; color: rgba(255, 255, 255, 0.9); margin-bottom: 25px; } #results .intermediate-results div { margin-bottom: 10px; font-size: 1em; } #results .intermediate-results span { font-weight: bold; margin-left: 5px; } .formula-explanation { background-color: #e9ecef; padding: 15px; border-radius: 5px; margin-top: 25px; font-size: 0.95em; border-left: 5px solid var(–primary-color); } .formula-explanation strong { color: var(–primary-color); } table { width: 100%; border-collapse: collapse; margin-top: 30px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(–border-color); } thead { background-color: var(–primary-color); color: white; } th { font-weight: bold; } tbody tr:nth-child(even) { background-color: #f2f2f2; } tbody tr:hover { background-color: #e9ecef; } caption { font-size: 1.1em; font-weight: bold; color: #333; margin-bottom: 10px; caption-side: top; text-align: left; } canvas { display: block; margin: 30px auto; max-width: 100%; background-color: var(–card-background); border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } .article-content { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(–border-color); } .article-content p { margin-bottom: 15px; } .article-content ul, .article-content ol { margin-left: 20px; margin-bottom: 15px; } .article-content li { margin-bottom: 8px; } .article-content a { color: var(–primary-color); text-decoration: none; } .article-content a:hover { text-decoration: underline; } .faq-list { border: 1px solid var(–border-color); border-radius: 5px; margin-top: 20px; } .faq-item { padding: 15px; border-bottom: 1px solid var(–border-color); } .faq-item:last-child { border-bottom: none; } .faq-question { font-weight: bold; color: var(–primary-color); cursor: pointer; margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center; } .faq-question::after { content: '+'; font-size: 1.2em; } .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; font-size: 0.95em; color: #555; } .faq-item.open .faq-answer { max-height: 200px; /* Adjust as needed */ } .faq-item.open .faq-question::after { content: '-'; } .related-tools { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(–border-color); } .related-tools ul { list-style: none; padding: 0; } .related-tools li { margin-bottom: 15px; padding: 10px; background-color: var(–background-color); border-radius: 5px; border: 1px solid var(–border-color); } .related-tools li a { font-weight: bold; display: block; margin-bottom: 5px; } .related-tools li p { font-size: 0.9em; color: #555; margin-bottom: 0; } @media (max-width: 768px) { h1 { font-size: 2em; } .container { padding: 20px; } .button-group { flex-wrap: wrap; } .button-group button, .button-group a.button { width: 100%; margin-bottom: 10px; } .button-group button:last-child, .button-group a.button:last-child { margin-bottom: 0; } #results .main-result { font-size: 2em; } }

Calculate Your Protein Needs Per Kilogram Body Weight

Protein Needs Calculator
Enter your current body weight in kilograms.
Sedentary (little to no exercise) Lightly Active (light exercise/sports 1-3 days/week) Moderately Active (moderate exercise/sports 3-5 days/week) Very Active (hard exercise/sports 6-7 days/week) Extra Active (very hard exercise/sports & physical job) Endurance Athlete / Bodybuilder Select your general daily activity level.
Your Estimated Daily Protein Needs:
How it Works: Your daily protein requirement is calculated based on your body weight and your activity level. Different activity levels necessitate different protein intake ranges to support muscle repair, growth, and overall bodily functions. We use established scientific guidelines to provide a tailored estimate.
Protein Needs Range by Activity Level
Activity Level Protein Range (g/kg body weight) Typical Use Case
Sedentary 0.8 – 1.0 Minimal physical activity, desk jobs.
Lightly Active 1.0 – 1.2 Light walking, occasional workouts.
Moderately Active 1.2 – 1.5 Regular gym sessions, moderate sports.
Very Active 1.5 – 1.8 Intense training, physically demanding jobs.
Extra Active 1.8 – 2.0 Very high intensity training, manual labor.
Endurance Athlete / Bodybuilder 1.6 – 2.2 Intense, prolonged training, muscle building focus.
Estimated Daily Protein Intake
Chart showing protein needs based on weight and activity level.

{primary_keyword}

Understanding how to calculate your protein needs per kilogram body weight is fundamental for anyone looking to optimize their health, fitness, and athletic performance. Protein is a vital macronutrient, acting as the building block for muscles, enzymes, hormones, and countless other tissues in the body. Unlike carbohydrates and fats, protein has a unique role in tissue repair and synthesis, making its adequate intake crucial, especially for active individuals. This calculation provides a personalized target, moving beyond generic recommendations to suit your specific physiological requirements.

Who should use it? This calculation is beneficial for athletes, bodybuilders, individuals engaged in regular physical activity, those trying to lose weight (as protein helps with satiety and preserving muscle mass), older adults (to combat sarcopenia), and anyone aiming for a balanced, healthy diet. Essentially, anyone who wants to ensure they are consuming enough of this essential nutrient will find value in knowing their protein needs per kilogram of body weight.

Common misconceptions about protein needs often revolve around consuming excessive amounts, believing that "more is always better." While active individuals and athletes require more protein, there are upper limits. Consuming significantly more protein than needed doesn't necessarily lead to increased muscle gain and can put a strain on the kidneys over time. Another misconception is that protein needs are static; they fluctuate based on activity levels, goals (muscle gain vs. maintenance), age, and overall health status. This is why a personalized approach, like calculating protein needs per kilogram of body weight, is far more effective.

{primary_keyword} Formula and Mathematical Explanation

The core of determining your protein requirements lies in understanding the recommended ranges of protein intake per kilogram of body weight, which vary based on your lifestyle and fitness goals. The formula is straightforward:

Daily Protein Intake (grams) = Body Weight (kg) × Protein Factor (g/kg)

This formula allows for a customized daily protein target. The key variable here is the 'Protein Factor', which is determined by your activity level and specific goals. We often provide a range (minimum and maximum) for the Protein Factor to account for individual variations and nuances in activity intensity.

Variable Explanations:

  • Body Weight (kg): This is your current body weight measured in kilograms. It serves as the baseline for your protein calculation.
  • Protein Factor (g/kg): This is a multiplier that represents the grams of protein recommended per kilogram of body weight. It is dictated by your activity level, training intensity, and fitness objectives (e.g., muscle gain, maintenance, endurance).

Variables Table:

Variable Meaning Unit Typical Range
Body Weight Your current mass. Kilograms (kg) Variable based on individual
Protein Factor Recommended protein intake per kg of body weight. Grams per kilogram (g/kg) 0.8 – 2.2
Daily Protein Needs Total estimated protein required per day. Grams (g) Variable based on weight and factor

Practical Examples (Real-World Use Cases)

Let's illustrate how to calculate your protein needs per kilogram body weight with a couple of practical scenarios:

Example 1: The Moderately Active Individual

Scenario: Sarah is 65 kg and works out at the gym 4 times a week, doing a mix of strength training and cardio. Her activity level is best described as 'Moderately Active'.

  • Input: Body Weight = 65 kg
  • Input: Activity Level = Moderately Active
  • Calculation: For a moderately active individual, the recommended protein range is typically 1.2 to 1.5 g/kg.
    • Minimum: 65 kg × 1.2 g/kg = 78 grams of protein per day
    • Maximum: 65 kg × 1.5 g/kg = 97.5 grams of protein per day
  • Result: Sarah's estimated daily protein needs are between 78 and 97.5 grams. She can aim for a value within this range, perhaps around 85-90 grams, depending on her specific dietary preferences and goals.

Example 2: The Endurance Athlete

Scenario: Mark is a marathon runner, weighing 80 kg. He trains intensely 6 days a week, with long runs and high-intensity interval sessions.

  • Input: Body Weight = 80 kg
  • Input: Activity Level = Endurance Athlete
  • Calculation: Endurance athletes often require a higher protein intake to aid muscle repair and recovery. The range is typically 1.6 to 2.2 g/kg.
    • Minimum: 80 kg × 1.6 g/kg = 128 grams of protein per day
    • Maximum: 80 kg × 2.2 g/kg = 176 grams of protein per day
  • Result: Mark's estimated daily protein needs are between 128 and 176 grams. Aiming for the higher end of this spectrum (e.g., 160-170 grams) is common for athletes undergoing such rigorous training to support muscle maintenance and performance.

These examples highlight how crucial it is to consider your activity level when determining your protein needs per kilogram body weight. A sedentary person has vastly different requirements than a dedicated athlete.

How to Use This Protein Needs Calculator

Our calculator simplifies the process of figuring out your daily protein target. Follow these easy steps:

  1. Enter Your Body Weight: Input your current weight in kilograms into the "Body Weight (kg)" field. Ensure accuracy for the most precise result.
  2. Select Your Activity Level: Choose the option from the dropdown menu that best describes your typical daily physical activity and exercise routine. Be honest with your selection, as this significantly impacts the recommendation.
  3. Click 'Calculate': Press the "Calculate" button. The calculator will instantly display your estimated daily protein needs.

How to read results:

  • Main Result: This is your primary estimated daily protein intake in grams.
  • Grams Per Kilogram: This shows the specific protein factor (g/kg) used for your calculation based on your selected activity level.
  • Min/Max Grams: These indicate the lower and upper bounds of the recommended protein intake range for your profile.

Decision-making guidance: Use the calculated range as a target. If your goal is muscle gain, you might aim for the higher end. For weight loss while preserving muscle, a moderate to higher intake is often recommended. For general health and maintenance, the mid-range is usually sufficient. Consult with a healthcare provider or registered dietitian for highly personalized advice.

Key Factors That Affect Protein Needs Results

While body weight and activity level are the primary drivers in calculating protein needs per kilogram body weight, several other factors can influence your optimal intake:

  1. Fitness Goals: Muscle hypertrophy (growth) requires a higher protein intake than simply maintaining muscle mass. Endurance athletes also have different needs related to muscle repair and energy metabolism.
  2. Age: Older adults may require slightly more protein to combat age-related muscle loss (sarcopenia) and maintain functional strength.
  3. Dietary Context: The overall composition of your diet matters. For instance, if you are in a caloric deficit for weight loss, ensuring adequate protein is crucial to minimize muscle breakdown.
  4. Health Status and Medical Conditions: Certain medical conditions, such as kidney disease, may require protein restriction. Conversely, recovery from illness or injury might necessitate increased protein intake to support tissue repair. Always consult a doctor for specific medical advice.
  5. Training Intensity and Volume: Simply exercising isn't enough; the intensity, duration, and frequency of your workouts significantly impact protein's role in recovery and adaptation. Higher volume and intensity generally lead to higher protein needs.
  6. Genetics: Individual genetic variations can influence how your body responds to protein intake and muscle protein synthesis. Some individuals may naturally build muscle more easily or require different nutrient ratios.
  7. Caloric Intake: If overall caloric intake is very low, the body may use protein for energy, increasing the need for dietary protein to spare muscle tissue.

Frequently Asked Questions (FAQ)

What is the difference between protein needs for strength training vs. endurance training?
Strength training typically focuses on muscle hypertrophy, often requiring protein intake at the higher end of the recommended ranges (e.g., 1.6-2.2 g/kg). Endurance athletes need protein for muscle repair and recovery from prolonged exertion, also falling within significant ranges (often 1.4-1.8 g/kg), but the primary goal is repair rather than substantial growth.
Can I get too much protein?
While the body is efficient at processing protein, consistently consuming excessively high amounts (well beyond recommended ranges) over extended periods *may* pose risks, particularly for individuals with pre-existing kidney issues. For most healthy individuals, the body will excrete excess nitrogen, but it's inefficient and doesn't provide additional benefits for muscle growth beyond a certain point.
Does body composition (muscle vs. fat) affect protein needs?
Protein needs are typically calculated based on total body weight, but some experts suggest adjusting calculations based on lean body mass, especially for individuals with very high body fat percentages. However, for simplicity and general recommendations, total body weight is the standard starting point.
How should I distribute my protein intake throughout the day?
While the total daily intake is most critical, distributing protein relatively evenly across meals (e.g., 20-40g per meal) can be beneficial for maximizing muscle protein synthesis and promoting satiety. This ensures a consistent supply of amino acids for your body's needs.
Is it better to get protein from whole foods or supplements?
Whole food sources like lean meats, poultry, fish, eggs, dairy, legumes, and tofu are generally preferred as they provide a broader spectrum of nutrients. Protein supplements (like whey or plant-based powders) are convenient for meeting higher intake goals, especially around workouts, but shouldn't replace whole foods entirely.
What if I have a medical condition like kidney disease?
Individuals with kidney disease often need to restrict protein intake. It is crucial to consult with a nephrologist or a renal dietitian for personalized recommendations, as standard calculations do not apply.
How does protein intake relate to weight loss?
Adequate protein intake is vital during weight loss. Protein has a higher thermic effect (burns more calories during digestion), promotes satiety (helping you feel full), and crucially, helps preserve lean muscle mass while you lose fat. This ensures that weight loss is primarily fat, not muscle.
Can I use my ideal weight instead of current weight if I'm overweight?
While some approaches suggest using lean body mass or a target weight, the most common and straightforward method for calculating protein needs per kilogram body weight uses your current total body weight. For significant weight loss goals, it's often recommended to consult a professional who can guide you on personalized adjustments.

© 2023 Your Website Name. All rights reserved.

var bodyWeightKgInput = document.getElementById('bodyWeightKg'); var activityLevelSelect = document.getElementById('activityLevel'); var mainResultSpan = document.getElementById('mainResult'); var gramsPerKgSpan = document.getElementById('gramsPerKg'); var minGramsSpan = document.getElementById('minGrams'); var maxGramsSpan = document.getElementById('maxGrams'); var proteinChart = document.getElementById('proteinChart'); var chartInstance = null; var proteinRanges = { sedentary: { min: 0.8, max: 1.0, label: "Sedentary" }, lightly_active: { min: 1.0, max: 1.2, label: "Lightly Active" }, moderately_active: { min: 1.2, max: 1.5, label: "Moderately Active" }, very_active: { min: 1.5, max: 1.8, label: "Very Active" }, extra_active: { min: 1.8, max: 2.0, label: "Extra Active" }, athlete: { min: 1.6, max: 2.2, label: "Endurance Athlete / Bodybuilder" } }; function validateInput(value, id, errorId, minValue = 0, maxValue = Infinity) { var inputElement = document.getElementById(id); var errorElement = document.getElementById(errorId); var isValid = true; errorElement.style.display = 'none'; inputElement.closest('.input-group').classList.remove('error'); if (value === ") { errorElement.textContent = 'This field cannot be empty.'; errorElement.style.display = 'block'; inputElement.closest('.input-group').classList.add('error'); isValid = false; } else { var numValue = parseFloat(value); if (isNaN(numValue)) { errorElement.textContent = 'Please enter a valid number.'; errorElement.style.display = 'block'; inputElement.closest('.input-group').classList.add('error'); isValid = false; } else if (numValue maxValue) { errorElement.textContent = 'Value cannot exceed ' + maxValue + '.'; errorElement.style.display = 'block'; inputElement.closest('.input-group').classList.add('error'); isValid = false; } } return isValid; } function calculateProteinNeeds() { var weightKg = parseFloat(bodyWeightKgInput.value); var activity = activityLevelSelect.value; var weightValid = validateInput(bodyWeightKgInput.value, 'bodyWeightKg', 'bodyWeightKgError', 1); // Min weight 1kg var activityValid = true; // Select element doesn't need explicit validation like number inputs for emptiness if (!weightValid) { mainResultSpan.textContent = '–'; gramsPerKgSpan.textContent = "; minGramsSpan.textContent = "; maxGramsSpan.textContent = "; updateChart(0, [], []); return; } var range = proteinRanges[activity]; if (!range) { mainResultSpan.textContent = 'Error'; gramsPerKgSpan.textContent = 'Invalid activity level selected.'; minGramsSpan.textContent = "; maxGramsSpan.textContent = "; updateChart(0, [], []); return; } var minProtein = weightKg * range.min; var maxProtein = weightKg * range.max; // Calculate a midpoint result for display var averageProtein = (minProtein + maxProtein) / 2; mainResultSpan.textContent = averageProtein.toFixed(1) + ' g'; gramsPerKgSpan.textContent = 'Protein Factor: ' + range.min.toFixed(1) + ' – ' + range.max.toFixed(1) + ' g/kg'; minGramsSpan.textContent = 'Minimum: ' + minProtein.toFixed(1) + ' g'; maxGramsSpan.textContent = 'Maximum: ' + maxProtein.toFixed(1) + ' g'; updateChart(weightKg, Object.values(proteinRanges), range.label); } function resetForm() { bodyWeightKgInput.value = '70'; // Sensible default activityLevelSelect.value = 'moderately_active'; // Sensible default document.getElementById('bodyWeightKgError').style.display = 'none'; document.getElementById('bodyWeightKg').closest('.input-group').classList.remove('error'); calculateProteinNeeds(); } function copyResults() { var weight = bodyWeightKgInput.value; var activity = activityLevelSelect.options[activityLevelSelect.selectedIndex].text; var main = mainResultSpan.textContent; var gramsPerKg = gramsPerKgSpan.textContent; var minGrams = minGramsSpan.textContent; var maxGrams = maxGramsSpan.textContent; var textToCopy = "— Protein Needs Calculation —\n\n"; textToCopy += "Body Weight: " + weight + " kg\n"; textToCopy += "Activity Level: " + activity + "\n\n"; textToCopy += "Estimated Daily Protein Needs:\n"; textToCopy += "Primary Estimate: " + main + "\n"; textToCopy += gramsPerKg + "\n"; textToCopy += minGrams + "\n"; textToCopy += maxGrams + "\n\n"; textToCopy += "Calculated using standard guidelines."; var textarea = document.createElement("textarea"); textarea.value = textToCopy; textarea.style.position = "fixed"; textarea.style.left = "-9999px"; document.body.appendChild(textarea); textarea.focus(); textarea.select(); try { var successful = document.execCommand('copy'); var msg = successful ? 'Results copied!' : 'Copy failed!'; // Optional: Show a temporary message to the user var tempMessage = document.createElement('div'); tempMessage.textContent = msg; tempMessage.style.position = 'fixed'; tempMessage.style.bottom = '20px'; tempMessage.style.left = '50%'; tempMessage.style.transform = 'translateX(-50%)'; tempMessage.style.backgroundColor = msg === 'Results copied!' ? 'var(–success-color)' : 'var(–error-color)'; tempMessage.style.color = 'white'; tempMessage.style.padding = '10px 20px'; tempMessage.style.borderRadius = '5px'; tempMessage.style.zIndex = '1000'; document.body.appendChild(tempMessage); setTimeout(function() { document.body.removeChild(tempMessage); }, 2000); } catch (err) { console.error('Unable to copy text.', err); } document.body.removeChild(textarea); } function updateChart(currentWeightKg, allRanges, currentActivityLabel) { var ctx = proteinChart.getContext('2d'); if (!ctx) return; // Destroy previous chart instance if it exists if (chartInstance) { chartInstance.destroy(); } var labels = []; var minData = []; var maxData = []; var currentActivityMin = null; var currentActivityMax = null; for (var i = 0; i idx === currentIndex ? ((currentActivityMin + currentActivityMax) / 2) : null), borderColor: 'rgba(54, 162, 235, 1)', backgroundColor: 'rgba(54, 162, 235, 0.6)', type: 'line', // Use line to make it visible fill: false, pointRadius: 8, pointHoverRadius: 10, showLine: false // Don't draw a line connecting this point }); } } chartInstance = new Chart(ctx, { type: 'bar', // Changed to bar for better visualization of ranges data: { labels: labels, datasets: datasets }, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true, title: { display: true, text: 'Daily Protein Needs (grams)' } }, x: { title: { display: true, text: 'Activity Level' } } }, plugins: { legend: { position: 'top', }, title: { display: true, text: 'Protein Needs Range Based on Activity Level' } }, tooltips: { // For older Chart.js versions callbacks: { label: function(tooltipItem, data) { var datasetLabel = data.datasets[tooltipItem.datasetIndex].label || "; var value = tooltipItem.yLabel; return datasetLabel + ': ' + value + ' g'; } } }, hover: { // For newer Chart.js versions mode: 'index', intersect: false, callbacks: { label: function(context) { var label = context.dataset.label || "; if (label) { label += ': '; } label += context.raw + ' g'; return label; } } } } }); } // Initial calculation on page load document.addEventListener('DOMContentLoaded', function() { // Check if Chart.js is loaded (assume it's globally available if this were a real WP setup) // For a standalone HTML file, we'd need to include the Chart.js library. // For this context, we'll assume it's available. // If using Chart.js, ensure it's properly linked in the . // // For this exercise, we simulate its presence. // Ensure Chart.js is defined before trying to use it. // In a real WordPress env, you'd enqueue the script. if (typeof Chart === 'undefined') { console.error("Chart.js is not loaded. Please include the Chart.js library."); // Optionally, disable chart functionality or show a message. var canvasContainer = document.querySelector('canvas[id="proteinChart"]').parentNode; canvasContainer.innerHTML = '

Chart.js library is required but not found.

'; return; // Stop execution if Chart.js is missing } resetForm(); // Set initial values and perform first calculation }); // FAQ functionality var faqItems = document.querySelectorAll('.faq-item'); faqItems.forEach(function(item) { var question = item.querySelector('.faq-question'); question.addEventListener('click', function() { item.classList.toggle('open'); }); });

Leave a Comment