You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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)/
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('');