Welcome to your first bootcamp exercise at IronHack!
The goal of this exercise is to get you acquainted with the different control structures we have in JavaScript.
Ready?
Edit the basic-algorithms.js
file with your editor and check the solutions in the developer tools console.
Ready to start?
- Fork this repo
- Then clone this repo
- Upon completion, run the following commands:
$ git add .
$ git commit -m "done"
$ git push origin master
- Create Pull Request so your TAs can check up your work.
-
Create a variable
hacker1
with the driver's name -
Print
"The driver's name is XXXX"
-
Create a variable
hacker2
and ask the user for the navigator's name -
Print
"The navigator's name is YYYY"
- Depending on which name is longer, print:
The Driver has the longest name, it has XX characters
orYo, navigator got the longest name, it has XX characters
orwow, you both got equally long names, XX characters!!
-
Print all the characters of the driver's name, separated by a space and in capitals ie.
"J O H N"
-
Print all the characters of the navigator's name, in reverse order. ie.
"nhoJ"
-
Depending on the lexicographic order of the strings, print:
The driver's name goes first
Yo, the navigator goes first definitely
What?! You both got the same name?
-
Ask the user for a new string and check if it's a Palindrome. Examples of palindromes:
- "A man, a plan, a canal, Panama!"
- "Amor, Roma"
- "race car"
- "stack cats"
- "step on no pets"
- "taco cat"
- "put it up"
- "Was it a car or a cat I saw?" and "No 'x' in Nixon".
-
Go to lorem ipsum generator and:
- Generate 3 parragraphs. Store the text in a String
- Make your program count the number of words in the string
- Make your program count the number of times the latin word
et
appears
- prompt() - MDN | Ask user for input
- String - MDN
- if - MDN
- while - MDN
- for - MDN