JavaScript | Random Key

Tuesday, October 30th, 2018 | Coding

var order_id = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
		
for( var i=0; i < 8; i++ )
order_id += possible.charAt(Math.floor(Math.random() * possible.length));


Comments


E19 Creative

Products | Support | About | Contact | Login