try{
catch{
finally{
Bonnes réponses: 1->try{
2-> catch{
3-> Finally{
Bonne réponse: (A)
Bonne réponse: (C)
Bonne réponse: (B)
Bonne réponse: (A)
Explication:
Bonnes réponses:
première case: if (age < 5 || age >= 65)
Deuxième case : if (age >= 5 || age < 18)
Bonne réponse: (C)
Bonne réponse:
<p id="para" onmouseover="hover('Can')" onmouseout="hover('Cannot')">cannot place a call</p>
Bonne réponse:
1. Switch(month)
2. Break
3. Break
Bonne réponse: (…)
Bonne réponse: B
On accède au paragraphe à travers innerHTML et au input à travers value
Bonne réponse:
[Link]
2-while(i<count){
Bonne réponse: (…)
var newImgElement = [Link]("img")
[Link] = "images/[Link]"
var divElement= [Link]("div")
[Link](newImgElement)
Bonne réponse: (B)
Bonne réponse: A
Bonne réponse: C
1. Using addEventListener with function reference:
javascript
[Link]("cottage").addEventListener("mouseover", displayText);
In this approach, you pass the function reference displayText directly to addEventListener. This is the most common and recommended way.
2. Using addEventListener with function call:
javascript
[Link]("cottage").addEventListener("mouseover", displayText());
In this approach, you're actually calling the displayText function and passing its return value (undefined) to addEventListener. This is incorrect because
you want to pass a reference to the function, not call the function immediately.
3. Using onmouseover property:
javascript
[Link]("cottage").onmouseover = displayText;
Similar to the first approach, here you're assigning the function reference displayText to the onmouseover property directly. This approach is simpler but
might be less flexible if you need to attach multiple event listeners.
4. Incorrect approach:
javascript
[Link]("cottage").addEventListener("onmouseover", displayText);
In this approach, you're using the event name "onmouseover" as the first argument to addEventListener, which is incorrect. You should provide just the event
name without the "on" prefix when using addEventListener.
Bonne réponse: (…)
Bonne réponse: (…)
Bonne réponse:
première: vrai
deuxième: faux
Bonnes réponses: (encerclées en rouge)
ouge)
Bonne réponse: var date = new Date(2021,0,1)
Syntaxe : Date(Year, month index,day)
attention on utilise monthon index (0 -> janvier)
Bonne réponse: (A)
Bonne réponse: voir flèches
Bonne réponse: (…)
Bonne réponse: (…)
Bonne réponse:
Grid[0][2] : contient X
Grid[2][1] : contient O
Bonne réponse: (…)
Ligne 1-string / Ligne 3-number / Ligne 4 – Boolean / Ligne 5 string
Bonne réponse: Faux,Vrai, Faux
Si vous avez besoin d'une boîte de dialogue avec des boutons "Oui" et "Non", vous pouvez utiliser la méthode confirm() en JavaScript.
la méthode [Link]() en JavaScript retourne l'élément ayant l'attribut id avec la valeur spécifiée dans le paramètre elementName, et non
l'attribut name.
Bonnes réponses: (…)
Bonnes réponses:
1- ||
2- &&
3- >
Bonne réponse: (E)
Bonnes réponses:
1-vrai
2- vrai
3-Faux
(le code JavaScript interne est inclus directement dans la balise <script> sans utiliser l'attribut src. Lorsque vous incluez du code JavaScript directement
dans la balise <script>, vous n'avez pas besoin de spécifier d'URL de fichier (comme vous le feriez avec src). Au lieu de cela, vous insérez directement le
code JavaScript entre les balises <script>.
Bonnes réponse: A,C
Bonne réponse: Révision: The shift() method removes the first array element and "shifts" all other elements to a lower index.
The pop() method removes the last element from an array:
The push() method adds a new element to an array (at the end):
The unshift() method adds a new element to an array (at the beginning)
[ 100,
40,
60,
10 ]
Bonnes réponse: C,E
Les mots clés sont : while et break
Bonne réponse: (…)
Bonne réponse:
n 10
c 55
a 0
d 5
Bonne réponse: B
Attention : Les choix A, C et D seront de type string
Bonnes réponses: 1->onclick | 2->onmouseover | 3->onmouseout
onclick="notify()" onmouseover="showRed()" onmouseout="showBlue()"
Bonne réponse: (D)
Le résultat est 40.