Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
option
:
Content language: English
Русский
Consider following code: <select> <option selected>HTML</option> <option>CSS</option> <option selected>JavaScript</option> </select> Which option will be shown as default?
option
Select correct statements on HTML Attributes
option
What attribute allows to define CSS option as a default in the drop-down list? <select> <option>HTML</option> <option>CSS</option> <option>JavaScript</option> </select>
option
What is the correct HTML for making a drop-down list?
option
What is the correct HTML for inserting a drop-down list?
option
Does it necessary to use a type attribute for the <script> tag in HTML5?
option
Option orElse
Option
What should be used instead of someMethod in the following code to get correct results? case class Employee( name: String, department: String, manager: Option[String] ) def lookupByName(name: String): Option[Employee] = name match { case "Joe" => Some(Employee("Joe", "Finances", Some("Julie"))) case "Mary" => Some(Employee("Mary", "IT", None)) case "Izumi" => Some(Employee("Izumi", "IT", Some("Mary"))) case _ => None } def getManager(employee: Option[Employee]): Option[String] = employee.flatMap(_.manager) getManager(lookupByName("Joe")).someMethod(Some("Mr. CEO")) == Some("Julie") getManager(lookupByName("Mary")).someMethod(Some("Mr. CEO")) == Some("Mr. CEO") getManager(lookupByName("Foo")).someMethod(Some("Mr. CEO")) == Some("Mr. CEO")
Option
Option filter
Option
What should be used instead of someMethod in the following code to get correct results? case class case class Employee(name: String, department: String, manager: Option[String]) def lookupByName(name: String): Option[Employee] = name match { case "Joe" => Some(Employee("Joe", "Finances", Some("Julie"))) case "Mary" => Some(Employee("Mary", "IT", None)) case "Izumi" => Some(Employee("Izumi", "IT", Some("Mary"))) case _ => None } lookupByName("Joe").someMethod(_.department != "IT") == Some(Employee("Joe", "Finances", Some("Julie"))) lookupByName("Mary").someMethod(_.department != "IT") == None lookupByName("Foo").someMethod(_.department != "IT") == None
Option
← Prev
1
2
Next →
Sign Up Now
or
Subscribe for future quizzes