Last active
November 27, 2018 01:10
-
-
Save chris-sev/b055d60ad8e0719501f71dfece728fd2 to your computer and use it in GitHub Desktop.
Replace http with https
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. we have a url | |
const url = "http://scotch.io"; | |
// 2. replace http: with https: | |
const httpsUrl = url.replace("http:", "https:"); | |
// 3. output: https://scotch.io | |
console.log(httpsUrl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment