Javascript interview questions part 10

Javascript interview questions part 10

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. What is the code snippet to change the class and let the stylesheet specify the details?

Correct Answer is : timestamp.className = "highlight";

2. Cookies were originally designed for __________

Correct Answer is : Server-side programming

3. The Cookie manipulation is done using which property?

Correct Answer is : cookie

4. Which of the following explains Cookies nature?

Correct Answer is : Transient

5. Which attribute is used to extend the lifetime of a cookie?

Correct Answer is : max-age

6. Which of the following defines the Cookie visibility?

Correct Answer is : all of the mentioned

7. Which of the following can be used to configure the scope of the Cookie visibility?

Correct Answer is : both path and domain

8. How can you set a Cookie visibility scope to localStorage?

Correct Answer is : /

9. Which of the following is a boolean cookie attribute?

Correct Answer is : secure

10. Which of the following function is used as a consequence of not including semicolons, commas or whitespace in the Cookie value?

Correct Answer is : encodeURIComponent()

11. What is the constraint on the data per cookie?

Correct Answer is : 4 KB

12. What is necessary when we need to create a new field in craft?

Correct Answer is : Type of the field

13. What does the getInputHtml() return?

Correct Answer is : Fieldtype’s input HTML

14. How many arguments does the getInputHtml() accept?

Correct Answer is : 2

15. Which is the method used to process on the input post data before it is saved to the database?

Correct Answer is : prepSettings()

16. What is the purpose of the parameter $name ?

Correct Answer is : Input Name

17. What does the method defineSettings() return?

Correct Answer is : Array of settings name

18. What is the purpose of the parameter $value?

Correct Answer is : Field’s current value

19. When does the defineContentAttribute() method return a false?

Correct Answer is : Data stored in its own table

20. How many events does the BaseFieldType provide?

Correct Answer is : 3

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon