js how to make a string with 10 constant chars code example Example: javascript create string of given length var str = new Array(len + 1).join( character );