Fonctions Swift Flashcards

1
Q

Ajouter un élément au début d’une liste ?

En Swift

A

liste = [élément] + liste

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Modifier un élément de liste en Swift.

A

liste[indice] = nouvel_element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Ajouter un élément à la fin d’une liste ? (2 méthodes)

En Swift

A

liste = liste + [élément]
Ou
liste += [élément]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Comment demander le type d’une variable en swift ?

A

variable.dynamicType

How well did you know this?
1
Not at all
2
3
4
5
Perfectly