Skip to content
 
 

Repository files navigation

SOCIAL OPLESK

🏴‍☠️ HACKS


📚 tutoriales de javascript tutorial 1 | tutorial 2 | tutorial 3

- NOTA HACER LAS PRÁCTICAS MEDIANTE VISUAL STUDIO CODE  
* Tienes que clonar el repositorio 
  git clone https://github.com/SocialOplesk/hack_javascript_1.git
  
* Instalar las dependencias del ecosistema hack_javascript_1:
  npm install 

* Para validar los hacks "hack_número_del_hack"
  npm run test hack_1/
  npm run test hack_2/
  npm run test hack_3/
  npm run test hack_(por cada número de hack)/

Hacks Details
H-1 [0,1,2,3,4,5]
H-2 [1,2,3,4,5]
H-3 [5,4,3,2,1]
H-4 [1,3,5,7]
H-5 [7,5,3,1]
H-6 ["f","o","o","z","i","m","a","n"]
H-7 ["Foo","Bar","Baz","Qux","Echo"]
H-8 ["b@r","b@z","QUX"]
H-9 2
H-10 ["bar","qux","octo","foobar"]
H-11 ["h@ck","one",2,"three",4,"five","h@ck","f00","Bar","b@z","quX","3ch0","h@ck"]

🏆 H-1 (FOR / WHILE)

loop: for, while output => [0,1,2,3,4,5]
tips: let i = 0; i++;

🏆 H-2 (FOR / WHILE)

loop: for, while output => [0,1,2,3,4,5]

🏆 H-3 (FOR / WHILE)

loop: for, while output => [0,1,2,3,4,5]

🏆 H-4 (FOR / WHILE / MAP)

loop: for, while, map output => [1,3,5,7]
tips: n % 2 == 0?"par":"impar";

🏆 H-5 (FOR / WHILE / MAP)

loop: for, while, map output => [7,5,3,1]
tips: let i = 7; | i--; | map: arr.reverse()

🏆 H-6 (FOR / WHILE)

loop: for, while output => ["f","o","o","z","i","m","a,"n"]
tips: arr[] = "str"; | arr.length;

🏆 H-7 (🕵️)

loop: for or while or map output => ["Foo","Bar","Baz","Qux","Echo"]
tips: str.toUpperCase(); | str.concat("another_str"); | `${str} ${another_str}` | str + another_str;

🏆 H-8 (🕵️)

loop: for or while or map output => ["b@r","b@z","QUX"]
tips: str.replace("foo", 'bar')

🏆 H-9 (🕵️)

output => 2

🏆 H-10 (🕵️)

loop: for or while or map output => ["bar","qux","octo","foobar"]

🏆 H-11 (🕵️)

loop: for or while or map output => ["h@ck","one",2,"three",4,"five","h@ck","f00","Bar","b@z","quX","3ch0","h@ck"]
tips: str.split(' ');

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages