Skip to content

functions.js L-226 generateRandomMacAdd() #2

@abuTalhaOFC

Description

@abuTalhaOFC

//2.16
genaretRendomMac = () =>{
let macAsset = [0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f']

   let one1 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let one2 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let two1 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let two2 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let three1 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let three2 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let four1 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let four2 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let five1 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let five2 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let six1 = macAsset[Math.floor(Math.random()*macAsset.length)]
   let six2 = macAsset[Math.floor(Math.random()*macAsset.length)]



   return`${one1}${one2}-${two1}${two2}-${three1}${three2}-${four1}${four2}-${five1}${five2}-${six1}${six2}`

}
console.log(genaretRendomMac())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions