- All Exams Instant Download
Which line of code should you use?
You are testing the value of the following variable in JavaScript.
var height = "300";
A block of code must execute if the following conditions are true:
• The height variable is set to 300
• The height variable is of type string
You need to implement the code to run the test.
Which line of code should you use?
A . if (height = = 300)
B . if (height = = “300")
C . if (height ! "300")
D . if (height ! = 300)
Answer: B
Explanation:
Use = = to test for equality.
Use "300" to test for the string.
Latest 70-480 Dumps Valid Version with 288 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments