Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printOut("---- Task 8 -----") + NEWLine;
- function setTextSize(aText, aSize, aValue, aAfter){
- let newText =aText;
- while(newText.length < aSize){
- if(aAfter === true){
- newText = newText + aValue
- }else{
- newText = aValue + newText;
- }
- }
- return newText;
- }
- const length = 12, value = "\u00a0", after = false;
- printOut(setTextSize("12", length, value, after));
- printOut(setTextSize("234", length, value, after));
- printOut(setTextSize("3", length, value, after));
- printOut(setTextSize("5678", length, value, after));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement