Defanging an IP Address
- javascript
- strings
Problem URL:Defanging an IP Address
My Solution
JavaScript
/**
* @param {string} address
* @return {string}
*/
const defangIPaddr = (address) => {
return address.split(".").join("[.]");
};
Let's Connect
Twitter •GitHub •LinkedIn