|
|
|
|
|
by saagarjha
2754 days ago
|
|
This doesn't work for me: $ swift
Welcome to Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1). Type :help for assistance.
1> let x = 3
x: Int = 3
2> if x in 2...4 {}
error: repl.swift:2:6: error: expected '{' after 'if' condition
if x in 2...4 {}
^
Are you sure you didn't mean to use if case? if case 2...4 = x
|
|