Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
en:modul:m291:learningunits:lu05:loesungen:08 [2025/01/27 13:36] vdemiren:modul:m291:learningunits:lu05:loesungen:08 [2025/03/27 09:23] (aktuell) – [Assignment] vdemir
Zeile 1: Zeile 1:
-====== LU05.S08 - v-if ======+====== LU05.S08 - v-if with numbers instead of bool ======
  
 ===== Sourcecode of the solution ===== ===== Sourcecode of the solution =====
  
-  * {{ :en:modul:m291:learningunits:lu05:loesungen:04_v-if_ueb1.zip | Sourcecode of the solution}}+{{ :en:modul:m291:learningunits:lu05:loesungen:m291_lu05_s08.zip | Sourcecode of the solution}}
  
 ===== Assignment ====== ===== Assignment ======
-In the script area of the W3-School example (link above) you will find a variable //typewritersInStock// with the value //true//In the html area of the same script there will be decidedwhat is supposed to happen in which caseIn the //true-case// there are typewriters on stock, and in the else-case (v-else) they are not+The first assignment checked by using v-if whether certain variable was checked or not (true/false)Nowwe want to go one step further and check not only whether it is true or false, but moreover which value it containsBy this, we would be able to tell the customer of how many typewriters we have in stock, which may be of some benefit for the customer as well as for us.
  
-  - Change the value of the variable //onStock// to //false// and run the script.  +  - Change the value of the variable //typewriter// to 0 und execute the script.  
-  - Note your realisations as a html-commen?+  - Note your realisations as a html-comment. 
 +  - Change the content of the variable //typeWriter// to -1 
 +  - What happens, if the value //typeWiter// has no value at all respectively is empty? 
 +  - Note your realisations as a js-comment or html-comment.
   - Save your script acoordingly, whether in your W3School workspace or on you local computer in your code-editor Webstorm.   - Save your script acoordingly, whether in your W3School workspace or on you local computer in your code-editor Webstorm.
  
 {{:en:modul:m291:learningunits:lu05:loesungen:lu05.s08.png?1000|Codesolution}} {{:en:modul:m291:learningunits:lu05:loesungen:lu05.s08.png?1000|Codesolution}}
- 
- 
  
 ===== Vocabulary ===== ===== Vocabulary =====
  • en/modul/m291/learningunits/lu05/loesungen/08.1737981367.txt.gz
  • Zuletzt geändert: 2025/01/27 13:36
  • von vdemir