Author name: Artturi Jalli

One-Line If-Else in Swift

Did you know that you can replace this simple if-else statement in Swift: with this neat one-liner expression? This is possible thanks to what is called a ternary conditional operator in Swift. The Full Syntax For your convenience, here is the structure of a ternary operator: Where: How to Use It? A ternary conditional operator offers a shorthand that …

One-Line If-Else in Swift Read More »

Git How to Change Remote Origin (with Examples)

To change your Git remote URL, use the git remote set-url command by specifying: Here’s what the command looks like: Typically running the above command looks like this: Example Let’s change the remote URL of an actual GitHub repo to demonstrate how the process works. I have a (private) Github repo at which I’ve …

Git How to Change Remote Origin (with Examples) Read More »

Scroll to Top