Skip to content

4GeeksAcademy/258sec-DomainNamesGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Domain Generator with Hack Support

📌 Description

This project generates domain name combinations using:

  • Pronouns
  • Adjectives
  • Nouns
  • Extensions

It also detects and applies domain hacks automatically.

Example:

redes + .es → red.es
Monexe + .exe → Mon.exe

⚙️ How It Works

  1. Combines:

    • pronoun
    • adjective
    • noun
  2. Checks if the generated name already ends with the extension (without the dot).

  3. If it does:

    • Removes that ending
    • Reattaches the extension properly
  4. If not:

    • Adds the extension normally

🧠 Hack Logic

Example:

name = "thegreatredes"
extension = ".es"

Steps:

  • Remove dot → "es"
  • Check:
thegreatredes endsWith "es" → true
  • Cut ending:
thegreatred
  • Add extension:
thegreatred.es

▶️ Example Output

thegreatred.es
thebigMon.exe
ourgreatQualcom.com
ourbigredes.deb

🚀 Purpose

Practice with:

  • Nested loops
  • String manipulation
  • .slice()
  • .endsWith()
  • Template literals

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors