Question: Please assist with the below. I received a response on what to fix, but I don't under. This is what was said: For task 1

Please assist with the below. I received a response on what to fix, but I don't under. This is what was said:
"For task 1:
your logic for this task needs some work, You can use the loop to find the index of the numbers and then try to swap the index of the last 2 numbers.
For task 2 when trying to click the submit button there is an error stating that checkPalindrome is not defined, please can you look into this.
I have also attached two links below that will help explain the for and while loops in more detail:"
Follow these steps:
Note: For this task, you will need to create an HTML file to get input from
a user. Refer to your previous learning material for a refresher if needed.
Create a new JavaScript file called swapping.js.
Write a program that asks the user to enter a number of at least 3 digits.
Make use of a for loop to swap the second digit and last digit in the
number
Output the original number and the new number.
Compulsory Task 2
Follow these steps:
Note: For this task, you will need to create an HTML file to get input from
a user. Refer to your previous learning material for a refresher if needed.
Create a JavaScript file called palindrome.js.
Write a program that asks the user to enter a word.
Using a while loop the program must determine whether or not the word
is a palindrome, ie. whether it reads the same forwards and backwards,
e.g. the word "racecar".
Output the given word and whether or not it is a palindrome.
E.g. "racecar is a palindrome" OR "car is not a palindrome"
Please assist with the below. I received a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!