Question
Can someone please help me with this javascript - Javascript ----------------------------------------------------------------------------------- Create an HTML file that takes in input and carries out of the following
Can someone please help me with this javascript - Javascript ----------------------------------------------------------------------------------- Create an HTML file that takes in input and carries out of the following functions and manipulates the DOM to show the outcome. Please put the question itself as a comment above each answer. Use either JavaScript, jQuery, or both (but know the difference!). -----------------------------------------------------------------------------------
1. Substring Define function substring(someStr, length, offset) Return the substring contained between offset and (offset + length) inclusively. If incorrect input is entered, use the alert function and describe why the input was incorrect.
2. Even Number Define function: isEven(someNum) Return true if even, false if odd. Do not use % operator.
3. Palindrome Define function isPalindrome(someStr) Return true if someStr is a palindrome, otherwise return false
4. Shapes Define function: printShape(shape, height, character) shape is a String and is either "Square", "Triangle", "Diamond". height is a Number and is the height of the shape. Assume the number is odd. character is a String that represents the contents of the shape. Assume this String contains just one character. Use a switch statement to determine which shape was passed in. Use the console.log function to print the desired shape. Example for printShape("Square", 3, "%"); %%% %%% %%% Example for printShape("Triangle", 3, "$"); $ $$ $$$ Example for printShape("Diamond", 5, "*"); * *** ***** *** *
---Thank you so much for helping!!
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