iOS Swift Basics An Introduction to Swift Programming Working With Variables

How do you re-assign a variable?

I have assigned string variable. How do re-assign it to another string later on?

variables.swift
// Enter your code below
var language = "Swift"
var language  "Objective-C"

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
52,653 Points

You reassign by using the assignment operator without the var keyword

language = "Objective-C"