Question
Please use javascript and please comment what is happening within the code to better my understanding. This is a simple program that does not require
Please use javascript and please comment what is happening within the code to better my understanding. This is a simple program that does not require much work so please be as descriptive as possible when going through it. Please use the correct indentations so that it is neat in javascipt rather than having it be a mess. Thank you! A beginner coder here so please do not use complex code so that I can understand it. Here to learn!
We are going to list all the characters shown below and their Damage and HP values using JS in codepen. We are only going to list the good fighters. We do not want weak fighters.
Example:
- List through a set of characters (you are not given the set of characters for the sake of this assignment). Assume this set of characters was already put into the program.
- Only display characters that have
- 10 or more health (number)
- deal 2 or more damage (number)
- and are a warrior (true/false)
- If the character has the letter "A" in it, make the text red
UseTHIS CODE.This is the array you will use in your application.
var warriors = [ { name:"Bob", damage:2, health:10, warrior:true }, { name:"Jerry", damage:1, health:12, warrior:true }, { name:"Mavis", damage:2, health:10, warrior:true }, { name:"Morty", damage:4, health:10, warrior:true }, { name:"Shorty", damage:10, health:3, warrior:false }, { name:"Porty", damage:1, health:14, warrior:true },{ name:"Perry", damage:2, health:9, warrior:true }, { name:"Larry", damage:2, health:17, warrior:false } ]
PEASE SHOW OUTPUT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Step 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