-
Notifications
You must be signed in to change notification settings - Fork 141
Description
"This page was built using: HTML, CSS and JavaScript". The words "HTML", "CSS", "JavaScript" should be stored in an array and generated on the website rather than be "hard-coded". The word “and” should not be in your array, but it should be in your sentence.
Create the array in a way that if more languages were added to the array, the code wouldn’t need any extra modifications.
Your solution needs to work with all of the following arrays interchangeably:
a. const codingLanguages = ["HTML"]
b. const codingLanguages = ["HTML", "CSS", "JavaScript"]
c. const codingLanguages = ["HTML", "CSS", "JavaScript", "Python", "Java", "C++"]
The original array must preserve its original characters without modifications (no adding spaces, commas, or any other character).
The sentence generated should have a space after each comma, except for the last element, which should have " and " before. e.g. ["HTML", "CSS", "JavaScript"] => '''This website has been created with: HTML, CSS and JavaScript'