Completed JS concatenation code