JS5: Task2: Second Variant of the task