Eaglenet logo
24/7 updates on happenings in africa
*LORDEAGLE 2015-10-11 10:18
Random Contents Tutorail.
Let me introduce u guys to something new; 85% of naija wapmasters knows ntn on what javascript is all abt and thats y we keep on using old things and practising monology(don't ask me d meanin). If u doubbt me check d random codes used by many wapmasters its of 2 types d one generatd 4rm weezywap nd d one used by weezy 4 his random logos(I lie?). But check oyibo dem! Nearly all their wapmasters have their own personsly made random content. Now let me share this out: every random content made usin js is done usin arrays that has index nos. 4rm 0 to the number of d arrays minus one becaus js starts countin 4rm 0. Now to get random number of d array we use js Math function called Math.random() this generates random nos b/w 0 and 1. It sound stupid ryt? Me 2 thought d same way wen I 1st heard of but have in d back of ur mind that all fractions and decimals are b/w 0 and 1. So naver 4gt that nos like 0.0000000001 and 0.9999999999 exist and they ar all in b/w 0 and 1 so mathematically there ar a billion and 1 nos b/w 0 & 1, if not infinity. Of course is not up to the number of things u want to list so what we do? Think of this @ dis stage Math.random()*10, lets assume the arrays(contents u wants to display) are 10 in number the above code will generate nos b/w 0 & 10. And u knw there ar still problem there, nos like 9.12346 is b/w 0 and 10 so what do we do since an array index must be an integer? We employ the service of Math.floor() Or Math.round(): what are they? How can they solve the problem? Why is one used in preference of the other in most cases? What else will I do with random content apart 4rm random logos,random ads and random quotes? How does waptrick add random ads in b/w their filelist? How can I make my Ads to be in one page just like major sites do and they will be click automatically in random when a visitor triggers a function? Find the answers to these questions and more in the next chapters of this tutorial,which I will be inspired to write by ur reactions and comments. Do have A nice Day; #LORDEAGLE DA UNTOLD STORY#
  • rated(1)
*TUZER said to Lordeagle 0n 2017-04-20 10:41
Nice One
  • rated(0)