script help
- JurajSlovakID
- Používateľ
- Príspevky: 838
- Dátum registrácie: Po 13. Apr, 2015, 09:35
- Bydlisko: Spišská Nová Ves
script help
caute chlapi, preco mi to nejde?
var age = 31;
if(age < 18);
{
document.write("You just are a pup!");
} else if(age >= 18 && age <= 29)
{
document.write("Welcome to young adulthood! Enjoy while you can!");
} else if(age >= 30 && age <= 39)
{
document.write("It's time to get serious about career and family!");
} else if(age >= 40 && <= 49)
{
document.write("It's time about to make a retirement! Make sure you're saving!");
} else if(age >= 50 && <= 59)
{
document.write("Enjoy your life now! You don't well!");
} else if(age >= 60)
{
document.write("60 is the new 40! Do something exciting");
}
var age = 31;
if(age < 18);
{
document.write("You just are a pup!");
} else if(age >= 18 && age <= 29)
{
document.write("Welcome to young adulthood! Enjoy while you can!");
} else if(age >= 30 && age <= 39)
{
document.write("It's time to get serious about career and family!");
} else if(age >= 40 && <= 49)
{
document.write("It's time about to make a retirement! Make sure you're saving!");
} else if(age >= 50 && <= 59)
{
document.write("Enjoy your life now! You don't well!");
} else if(age >= 60)
{
document.write("60 is the new 40! Do something exciting");
}
PC: CPU: RYZEN 5950X VMR-B2@ 4725MHz 1.35V , Chladic Arctic Liquid Freezer II RAM: GSKILL NEO 2x16KIT(32GB) 14-15-15-12-26-38 CR2 - upravene tercialne casovania, GFX: AMD Vega64, MB: Asus Dark Hero VIII X570, M.2 SSD Samsung 990 PRO 2TB, 2xRAID1 WDGOLD 8TB
-
- Sponzor fóra gold
- Príspevky: 7935
- Dátum registrácie: Po 28. Feb, 2011, 11:49
- Bydlisko: Bratislava
Re: script help
nabuduce napis co presne ti nejde, aky je to jazyk... nikto tu nema vestecku gulu
var age = 31;
if(age < 18); <- tu nema byt
{
document.write("You just are a pup!");
} else if(age >= 18 && age <= 29)
{
document.write("Welcome to young adulthood! Enjoy while you can!");
} else if(age >= 30 && age <= 39)
{
document.write("It's time to get serious about career and family!");
} else if(age >= 40 && <tu-nieco-chyba> <= 49)
{
document.write("It's time about to make a retirement! Make sure you're saving!");
} else if(age >= 50 && <tu-nieco-chyba> <= 59)
{
document.write("Enjoy your life now! You don't well!");
} else if(age >= 60)
{
document.write("60 is the new 40! Do something exciting");
}
Naposledy upravil/-a LordKJ v Ut 05. Nov, 2019, 14:26, upravené celkom 1 krát.
main: 9950X + Noctua NH-D15 G2, ASUS STRIX B650E-F, Kingston 64gb DDR5 6000 CL30, 7900 GRE Nitro+, 990 Pro 4TB, ASUS STRIX Aura RGB 1000W, Fractal North XL + 4x Noctua A14x25 G2
Re: script help
Taketo temy by som bez zavahania lockoval.
Ziadny popis, co si skusal, nic.
Ziadny popis, co si skusal, nic.
- PROMETHEUS
- Používateľ
- Príspevky: 2075
- Dátum registrácie: Ne 23. Jan, 2005, 20:00
- Bydlisko: Banska Bystrica
Re: script help
aky IDE pouzivas? ja mam visual studio a to by ti hned napisalo kde mas chyby a je kopec light programov co maju tiez slusny debug a toto by ti hned vyskocilo.
MB: MSI X570 Tomahawk CPU: Ryzen 5900X RAM: BL2K8G36C16U4BL 4x8GB 3733MHz 16-18-18-35 GPU: Gigabyte RTX 3080 Gaming OC Waterforce Monitor: LG Ultragear 27GL83A-B SSD: WD Black SN850 1TB, SN750 500GB, 4x1TB Samsung EVO CASE: Lian Li O11 Dynamic XL PSU: EVGA 850W G2 Klavesnica, mys: Logitech G915 TKL + Logitech G903 Chladenie: CPU block: EK Quantum Velocity D-RGB Rads: EK SE360mm + EK XE360mm Fans: 9x Noctua NF-A12x25 PWM Pump: EK QUANTUM KINETIC TBE 200 D5 PWM D-RGB
- JurajSlovakID
- Používateľ
- Príspevky: 838
- Dátum registrácie: Po 13. Apr, 2015, 09:35
- Bydlisko: Spišská Nová Ves
Re: script help
je ocividne o co ide, skor ma to napadne z kodu nez hladat temu
pouzivam sublime text
v skratke zaradujem vystupy tipy na obdobie v ktorom clovek zije, je to len priklad
podla hodnoty var age=xx bude stanoveny textovy vystup
edit: je to javascript
pouzivam sublime text
v skratke zaradujem vystupy tipy na obdobie v ktorom clovek zije, je to len priklad
podla hodnoty var age=xx bude stanoveny textovy vystup
edit: je to javascript
PC: CPU: RYZEN 5950X VMR-B2@ 4725MHz 1.35V , Chladic Arctic Liquid Freezer II RAM: GSKILL NEO 2x16KIT(32GB) 14-15-15-12-26-38 CR2 - upravene tercialne casovania, GFX: AMD Vega64, MB: Asus Dark Hero VIII X570, M.2 SSD Samsung 990 PRO 2TB, 2xRAID1 WDGOLD 8TB
-
- Sponzor fóra gold
- Príspevky: 7935
- Dátum registrácie: Po 28. Feb, 2011, 11:49
- Bydlisko: Bratislava
Re: script help
no ved som ti to vyriesil. (cerveny text)
Len o pomoc sa neziada tak, ze tu mate kod a povedzte mi preco to nejde pricom ani nepovies co nejde
Len o pomoc sa neziada tak, ze tu mate kod a povedzte mi preco to nejde pricom ani nepovies co nejde
main: 9950X + Noctua NH-D15 G2, ASUS STRIX B650E-F, Kingston 64gb DDR5 6000 CL30, 7900 GRE Nitro+, 990 Pro 4TB, ASUS STRIX Aura RGB 1000W, Fractal North XL + 4x Noctua A14x25 G2
- JurajSlovakID
- Používateľ
- Príspevky: 838
- Dátum registrácie: Po 13. Apr, 2015, 09:35
- Bydlisko: Spišská Nová Ves
Re: script help
var age = 31;
if(age < 18);
{
document.write("You just are a pup!");
} else if(age >= 18 && age <= 29)
{
document.write("Welcome to young adulthood! Enjoy while you can!");
} else if(age >= 30 && age <= 39)
{
document.write("It's time to get serious about career and family!");
} else if(age >= 40 && age <= 49)
{
document.write("It's time about to make a retirement! Make sure you're saving!");
} else if(age >= 50 && age <= 59)
{
document.write("Enjoy your life now! You don't well!");
} else if(age >= 60)
{
document.write("60 is the new 40! Do something exciting");
}
Ok ospravednte ma prosim.
Dakujem za tio, no mam to teraz takto a nepise nic ani v chrome ani vo ff.
if(age < 18);
{
document.write("You just are a pup!");
} else if(age >= 18 && age <= 29)
{
document.write("Welcome to young adulthood! Enjoy while you can!");
} else if(age >= 30 && age <= 39)
{
document.write("It's time to get serious about career and family!");
} else if(age >= 40 && age <= 49)
{
document.write("It's time about to make a retirement! Make sure you're saving!");
} else if(age >= 50 && age <= 59)
{
document.write("Enjoy your life now! You don't well!");
} else if(age >= 60)
{
document.write("60 is the new 40! Do something exciting");
}
Ok ospravednte ma prosim.
Dakujem za tio, no mam to teraz takto a nepise nic ani v chrome ani vo ff.
PC: CPU: RYZEN 5950X VMR-B2@ 4725MHz 1.35V , Chladic Arctic Liquid Freezer II RAM: GSKILL NEO 2x16KIT(32GB) 14-15-15-12-26-38 CR2 - upravene tercialne casovania, GFX: AMD Vega64, MB: Asus Dark Hero VIII X570, M.2 SSD Samsung 990 PRO 2TB, 2xRAID1 WDGOLD 8TB
Re: script help
Ach tie slovenské mamičky
shiro napísal:blba mamicka s kocikom sa mi vdrbe do cesty a pre istotu kocikom napred, nech najprv zrazim dieta a mam o to vacsi trest....
- JurajSlovakID
- Používateľ
- Príspevky: 838
- Dátum registrácie: Po 13. Apr, 2015, 09:35
- Bydlisko: Spišská Nová Ves
Re: script help
let age = 31;
switch(true) {
case (age < 18):
document.write("You just are a pup!");
break;
case (age <= 29):
document.write("Welcome to young adulthood! Enjoy while you can!");
break;
case (age <= 39):
document.write("It's time to get serious about career and family!");
break;
case (age <= 49):
document.write("It's time about to make a retirement! Make sure you're saving!");
break;
case (age <= 59):
document.write("Enjoy your life now! You don't well!");
break;
case (age >= 60):
document.write("60 is the new 40! Do something exciting");
break;
}
takto to ide ale musim vediet preco minule riesenie nefungovalo tak pls help.
switch(true) {
case (age < 18):
document.write("You just are a pup!");
break;
case (age <= 29):
document.write("Welcome to young adulthood! Enjoy while you can!");
break;
case (age <= 39):
document.write("It's time to get serious about career and family!");
break;
case (age <= 49):
document.write("It's time about to make a retirement! Make sure you're saving!");
break;
case (age <= 59):
document.write("Enjoy your life now! You don't well!");
break;
case (age >= 60):
document.write("60 is the new 40! Do something exciting");
break;
}
takto to ide ale musim vediet preco minule riesenie nefungovalo tak pls help.
PC: CPU: RYZEN 5950X VMR-B2@ 4725MHz 1.35V , Chladic Arctic Liquid Freezer II RAM: GSKILL NEO 2x16KIT(32GB) 14-15-15-12-26-38 CR2 - upravene tercialne casovania, GFX: AMD Vega64, MB: Asus Dark Hero VIII X570, M.2 SSD Samsung 990 PRO 2TB, 2xRAID1 WDGOLD 8TB
Re: script help
bodkočiarka za if
Ach tie slovenské mamičky
shiro napísal:blba mamicka s kocikom sa mi vdrbe do cesty a pre istotu kocikom napred, nech najprv zrazim dieta a mam o to vacsi trest....
-
- Sponzor fóra gold
- Príspevky: 7935
- Dátum registrácie: Po 28. Feb, 2011, 11:49
- Bydlisko: Bratislava
Re: script help
ta cervena bodkociarka tam nema byt lebo ukoncuje ten if a tym padom else if za tym nedavaju zmysel
main: 9950X + Noctua NH-D15 G2, ASUS STRIX B650E-F, Kingston 64gb DDR5 6000 CL30, 7900 GRE Nitro+, 990 Pro 4TB, ASUS STRIX Aura RGB 1000W, Fractal North XL + 4x Noctua A14x25 G2
- JurajSlovakID
- Používateľ
- Príspevky: 838
- Dátum registrácie: Po 13. Apr, 2015, 09:35
- Bydlisko: Spišská Nová Ves
Re: script help
uz to ide, toto som potreboval, dakujem vsetkym.
PC: CPU: RYZEN 5950X VMR-B2@ 4725MHz 1.35V , Chladic Arctic Liquid Freezer II RAM: GSKILL NEO 2x16KIT(32GB) 14-15-15-12-26-38 CR2 - upravene tercialne casovania, GFX: AMD Vega64, MB: Asus Dark Hero VIII X570, M.2 SSD Samsung 990 PRO 2TB, 2xRAID1 WDGOLD 8TB