> Tutorial
Character strings are a type of value used to represent text.
A string is written between single or double quotes:
let a = "hi"let b = 'hello world'The + operator is the concatenation operator, which will "glue" two strings together:
Many operations are available for strings, the main ones are:
Examples of use:
The enemy.name property returns the name of an entity. We'll use it to greet our opponent on turn 1:
The me.say() method allows your leek to say something, it costs 1 TP . For an enemy named Domingo, our leek will say: "Hi Domingo !". Do not hesitate to personalize it, remaining polite!
What is the result of the code "10" + 5 + "aa"?
"105aa" "15aa" "10aaaaaaaa" "15aaaaa"
What is the result of the code "eucalyptus".slice(4, 7)?
"lyp" "euc" "ptus" "euca"
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.