repeat function for int times js code example Example: repeat string n times javascript "a".repeat(10)