Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. printOut("---- Task 8 -----") + NEWLine;
  2. function setTextSize(aText, aSize, aValue, aAfter){
  3. let newText =aText;
  4. while(newText.length < aSize){
  5. if(aAfter === true){
  6. newText = newText + aValue
  7. }else{
  8. newText = aValue + newText;
  9. }
  10. }
  11. return newText;
  12. }
  13. const length = 12, value = "\u00a0", after = false;
  14. printOut(setTextSize("12", length, value, after));
  15. printOut(setTextSize("234", length, value, after));
  16. printOut(setTextSize("3", length, value, after));
  17. printOut(setTextSize("5678", length, value, after));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement