![JavaScript basic: Create a new string from a given string, removing the first and last characters of the string if the first or last character are 'P' - w3resource JavaScript basic: Create a new string from a given string, removing the first and last characters of the string if the first or last character are 'P' - w3resource](https://www.w3resource.com/w3r_images/javascript-basic-exercise-flowchart-67.png)
JavaScript basic: Create a new string from a given string, removing the first and last characters of the string if the first or last character are 'P' - w3resource
![JavaScript basic: Create a new string taking the first and last n characters from a given string - w3resource JavaScript basic: Create a new string taking the first and last n characters from a given string - w3resource](https://www.w3resource.com/w3r_images/javascript-basic-image-exercise-68.png)
JavaScript basic: Create a new string taking the first and last n characters from a given string - w3resource
![JavaScript basic: Create a new string from a given string changing the position of first and last characters - w3resource JavaScript basic: Create a new string from a given string changing the position of first and last characters - w3resource](https://www.w3resource.com/w3r_images/javascript-basic-exercise-flowchart-23.png)
JavaScript basic: Create a new string from a given string changing the position of first and last characters - w3resource
![JavaScript basic: Create a new string from a given string changing the position of first and last characters - w3resource JavaScript basic: Create a new string from a given string changing the position of first and last characters - w3resource](https://www.w3resource.com/w3r_images/javascript-basic-image-exercise-23.png)