rubiyakhadkaa123 rubiyakhadkaa123
  • 20-11-2021
  • Computers and Technology
contestada

Develop an algorithm and draw a flowchart to determine and input number is palindrome or not.​

Respuesta :

PhysicsGirl
PhysicsGirl PhysicsGirl
  • 20-11-2021

function checkPalindrome(str){
let reversed = str.split("").reverse().join("")
return str === reversed
}
let str1 = "anna"
let str2 = "banana"
let str3 = "kayak"
checkPalindrome(str1)
// -> true
checkPalindrome(str2)
// -> false
checkPalindrome(str3)
// -> true
Answer Link

Otras preguntas

Select the three careers in the technical aspect of digital Explain the core concepts of the Canons of Journalism being violated and how such violations might b
What is the correct sequence of events that led to Madam Walker starting her own hair care company?
PLEASE HELP ASAP ! What is the solution to the inequality below? |x| > 14
Find the mean of the following data: 4, 5, 6, 6, 7, 9, 12.
If you are heating water on stove why does it take a while for the water to boil
HELP ASAP!!!! (also image is below) Figure ABCD is transformed to figure A prime B prime C prime D prime, as shown below: A coordinate grid is shown from negati
Explain the effect a change in temperature, volume, and pressure has on gas particles. then explain if these changes are an example of a direct or an inverse re
(100points) (Spanish)
Which level of organization is shown in the image? • cell • tissue •organ © organ system
can green plants and humans us the same process to create atp