Zhorzh

pipe hw

Jan 22nd, 2022
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. const pipe = ((testString) => {
  2. const getName = (obj) => {
  3. return obj.name;
  4. };
  5. const uppercase = (personName) => {
  6. return personName.toUpperCase();
  7. };
  8. const get3Characters = (personName) => {
  9. return personName.substring(0, 3);
  10. };
  11. console.log(get3Characters(uppercase(getName(testString))));
  12. })({name: 'Pesho'});
Advertisement
Add Comment
Please, Sign In to add comment