Computer scienceProgramming languagesJavaScriptWorking with dataStrings

String transforming

Substrings

Report a typo

You receive a long string containing a variety of data. You know that the first ten symbols contain the username, the second ten are the password, and the other symbols contain the profession. Return the user's name and job title.

Sample Input 1:

John      john2000  frontend developer

Sample Output 1:

My name is John and I'm a frontend developer.
Write a program in JavaScript
function greeting(line) {
//write your code here
return ("My name is " + name + " and I'm a " + job + ".");
}
___

Create a free account to access the full topic