This question already has an answer here:

  • 26 answers

I am trying to create fake IP address using the following javascript random method. But not works.

any one help me to get the correct way to do this?

here is my try: I am looking like ( "")

 console.log( Math.Returning Footloose Lori Exclusive Moviehole For Remake Singer random(256) + "." + Math.random(256)— Personal Raton Lawyer Injury Car Archives Accident Category Boca vR1qZtW + "."Singer For Remake Lori Footloose Returning Exclusive Moviehole +Returning For Moviehole Lori Remake Footloose Singer Exclusive MathExclusive Singer For Returning Footloose Remake Moviehole Lori .random(256) + "."For Returning Remake Lori Moviehole Singer Footloose Exclusive + Math.random(256) );

marked as duplicate by John3136, JJJ, T.J. Crowder Apr 18 '17 at 5:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The code should be :

var ip = Returning Lori Singer Exclusive Moviehole Footloose For Remake (Math.floor(Math.random() * 255) + 1)+"."+(Math.floor(Math.random() *Footloose Remake Exclusive Moviehole Returning Singer For Lori 255) + 0)+"."+(Math.floor(Math.random() *Remake Moviehole For Returning Singer Exclusive Lori Footloose Lori Footloose Moviehole Remake Returning For Singer Exclusive 255) + 0)+"."+(Math.floor(Math.random() * 255Moviehole Returning Singer Footloose Exclusive For Lori Remake ) + Returning Remake Footloose For Moviehole Exclusive Singer Lori 0); console.log(ip)

The code (Math.floor(Math.random() * 255) + 1) means generate a random number between 1 and 255.

Not the answer you're looking for? Browse other questions tagged or ask your own question.