2017-11-01 22:15:43 +01:00
|
|
|
# Kapitel 3: Übertragungsprotokolle und Datentransformationen \(02.11.2017\)
|
2017-09-19 21:09:45 +02:00
|
|
|
|
2017-11-01 23:20:55 +01:00
|
|
|
{% exercise %}
|
|
|
|
Define a variable `x` equal to 10.
|
2017-09-19 21:09:45 +02:00
|
|
|
|
2017-11-01 23:20:55 +01:00
|
|
|
{% initial %}
|
|
|
|
var x =
|
|
|
|
|
|
|
|
{% solution %}
|
|
|
|
var x = 10;
|
|
|
|
|
|
|
|
{% validation %}
|
|
|
|
assert(x == 10);
|
|
|
|
|
|
|
|
{% context %}
|
|
|
|
// This is context code available everywhere
|
|
|
|
// The user will be able to evaluate `exposedVar`
|
|
|
|
var exposedVar = 3;
|
|
|
|
// ... or call `exposedFunction`
|
|
|
|
function exposedFunction {
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
{% endexercise %}
|
2017-09-19 21:09:45 +02:00
|
|
|
|