Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I created a ratio button in the html file I want to that the even numbers are highlighted when the even number button is click.
I created a ratio button in the html file I want to that the even numbers are highlighted when the even number button is click.
function highlight() { let divABC = document.querySelectorall("div.abc"); let isVowel = x => x == "A" || x == "E" || x == "I" || x == "0" || x == "U" | let is let value = this.value; x == "Y" divABC.forEach(e => { let letter = e.dataset.abc; e.className = "abc"; if (value == "vowel" && isVowel(letter)) _e.className = "abc high-light"; if (value == "consonant" && !isVowel(letter)); e.className = "abc high-light"; if(value =="even" && isVowel(letter) ), e.className = "abc high-light"; Highlight: O Vowel O Consonant O None O Even A, B, C, D, E, F | G | Ho 1o do K, L, M, NA 0, P Q, R, S, T, U, VW, X, Y28 22 function highlight() { let divABC = document.querySelectorall("div.abc"); let isVowel = x => x == "A" || x == "E" || x == "I" || x == "0" || x == "U" | let is let value = this.value; x == "Y" divABC.forEach(e => { let letter = e.dataset.abc; e.className = "abc"; if (value == "vowel" && isVowel(letter)) _e.className = "abc high-light"; if (value == "consonant" && !isVowel(letter)); e.className = "abc high-light"; if(value =="even" && isVowel(letter) ), e.className = "abc high-light"; Highlight: O Vowel O Consonant O None O Even A, B, C, D, E, F | G | Ho 1o do K, L, M, NA 0, P Q, R, S, T, U, VW, X, Y28 22Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started