خرید بک لینک

Vote count: 0

So this is my very first code in javascript! kind of a copy/make my own code kind of thing, Ive been trying to go through tutorials and kind of get it? but well this code doesn't work! and wanted to find out why??? maybe an explanation why so i understand where im going with this...

document.write("Random # (1-5) = ", Math.floor((Math.random() * 5) + 1), "<br />");
if(Random = 2){
 alert("Your names Bob");
}else {
 alert("Your names Superman");
}

so i asked it to write to the page a random number between 1 and 5, (works fine...) then said if the random number is 2 i wanted to alert the page that there name is bob and if the number isn't 2, alert them that there name is superman...

Complete noob/begier here, sorry if this frustrates you but appreciate it on understanding my situation! only way to lea!!! cheers :)

asked 48 secs ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 22 فروردين 1395 ساعت: 21:02

صفحه بندی