Question: JavaScript Question: Please follow the instruction below 1. charAt Write a function called charAt which accepts a string and an index (number) and returns the
JavaScript Question:
Please follow the instruction below

1. charAt Write a function called charAt which accepts a string and an index (number) and returns the character at that index. The function should return an empty string if the number is greater than the length of the string. Do not use the built in charAt method - the tests will fail if you do! i > 'use strict'; 26 27 /* 28 * Complete the 'charAt' function below. 29 30 * The function is expected to return a CHARACTER. 31 * The function accepts following parameters: 32 1. STRING str 33 2. INTEGER index 34 */ 35 36 function charAt(str, index) { 37 } * 38
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
