Contoh Soal Quiz Javascript, Quiz PHP, dan Quiz Bootstrap


Pada artikel kali ini, saya akan memberikan contoh soal quiz mengenai Javascript. PHP, dan Bootstrap. sebelum lanjut ke contoh soalnya, kita akan melihat defenisi dari masing-masing materi.

Fungsi JavaScript, atau yang sering disingkat JS, adalah menjadikan website lebih interaktif. Scriptnya dijalankan di browser user alih-alih server, dan biasanya masuk ke library pihak ketiga untuk menyediakan fungsionalitas tingkat lanjut tanpa mengharuskan developer melakukan coding dari awal.

PHP merupakan bahasa pemrograman server-side, sedangkan JavaScript adalah bahasa pemrograman yang dijalankan di client-side. Bahasa ini sering terlihat di sistem manajemen konten berbasis PHP, misalnya WordPress, tapi juga sering digunakan untuk pengembangan back-end karena menyediakan jalan terbaik guna memfasilitasi proses transfer informasi dari dan ke database. PHP merupakan kepanjang dari Program Hypertext Preprocessor.

Bootstrap adalah open-source framework front-end (library) yang gratis untuk merancang situs web dan aplikasi web. Framework ini berisi template desain berbasis HTML dan CSS untuk tipografi, formulir, tombol, navigasi dan komponen antarmuka lainnya, serta juga ekstensi opsional JavaScript. Framework ini berfokus hanya ke front-end saja. 

Baiklah setelah tahu sedikit defenisi dari materi diatas, langsung saja kita lihat Contoh Soal Quiz Javascript, PHP, dan Bootstrap:

JAVASCRIPT QUIZ
  1. Inside which HTML element do we put the JavaScript? <script> 
  2. What is the correct JavaScript syntax to change the content of the HTML element below?      <p id="demo">This is a demonstration.</p> document.getElementById("demo").innerHTML = "Hello World!";
  3. Where is the correct place to insert a JavaScript? Both the <head> section and the <body> section are correct 
  4. What is the correct syntax for referring to an external script called "xxx.js"? <script src="xxx.js"> 
  5. The external JavaScript file must contain the <script> tag. False 
  6. How do you write "Hello World" in an alert box? alert("Hello World"); 
  7. How do you create a function in JavaScript? function myFunction() 
  8. How do you call a function named "myFunction"? myFunction() 
  9. How to write an IF statement in JavaScript? if (i == 5) 
  10. How to write an IF statement for executing some code if "i" is NOT equal to 5? if (i != 5) 
  11. How does a WHILE loop start? while (i <= 10) 
  12. How does a FOR loop start? for (i = 0; i <= 5; i++) 
  13. How can you add a comment in a JavaScript? //This is a comment 
  14.  How to insert a comment that has more than one line? /*This comment has more than one line*/ 
  15. What is the correct way to write a JavaScript array? var colors = ["red", "green", "blue"] 
  16. How do you round the number 7.25, to the nearest integer? Math.round(7.25) 
  17. How do you find the number with the highest value of x and y? Math.max(x, y) 
  18. What is the correct JavaScript syntax for opening a new window called "w2" ? w2 = window.open("http://www.w3schools.com"); 
  19. JavaScript is the same as Java. False 
  20. How can you detect the client's browser name? navigator.appName 
  21. Which event occurs when the user clicks on an HTML element? onclick 
  22. How do you declare a JavaScript variable? var carName; 
  23. Which operator is used to assign a value to a variable? = = 
  24. What will the following code return: Boolean(10 > 9) true 
  25.  Is JavaScript case-sensitive? Yes 
PHP QUIZ
  1. What does PHP stand for? PHP: Hypertext Preprocessor
  2.  PHP server scripts are surrounded by delimiters, which? <?php...?> 
  3. How do you write "Hello World" in PHP? echo "Hello World"; 
  4. All variables in PHP start with which symbol?
  5. What is the correct way to end a PHP statement?
  6. The PHP syntax is most similar to: Perl and C 
  7. How do you get information from a form that is submitted using the "get" method? $_GET[]; 
  8. When using the POST method, variables are displayed in the URL: False 
  9. In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings: True 
  10. Include files must have the file extension ".inc" False 
  11. What is the correct way to include the file "time.inc" ? <?php include "time.inc"; ?> 
  12. What is the correct way to create a function in PHP? function myFunction() 
  13. What is the correct way to open the file "time.txt" as readable? fopen("time.txt","r"); 
  14. PHP allows you to send emails directly from a script. True 
  15. Which superglobal variable holds information about headers, paths, and script locations? $_SERVER 
  16. What is the correct way to add 1 to the $count variable? $count++; 
  17.  What is a correct way to add a comment in PHP? /*...*/ 
  18.  PHP can be run on Microsoft Windows IIS(Internet Information Server): True 
  19. The die() and exit() functions do the exact same thing. True 
  20. Which one of these variables has an illegal name? $my-Var 
  21. How do you create a cookie in PHP? setcookie() 
  22. In PHP, the only way to output text is with echo. False 
  23. How do you create an array in PHP? $cars = array("Volvo", "BMW", "Toyota"); 
  24. The if statement is used to execute some code only if a specified condition is true? True 
  25. Which operator is used to check if two values are equal and of same data type? ===

BOOTSTRAP QUIZ 
  1. Bootstrap 3 is mobile-first. True
  2. Which class provides a responsive fixed width container? .container 
  3. Which class provides a full width container, spanning the entire width of the viewport? .container-fluid 
  4. The Bootstrap grid system is based on how many columns? 12 
  5. Which class adds zebra-stripes to a table? .table-striped 
  6. Which class shapes an image to a circle? .img-circle 
  7. Which class is used to create a big box for calling extra attention? .jumbotron 
  8. Which button class is used to create a large button? .btn-lg 
  9. Which class is used to create a button group? .btn-group 
  10. How can you insert a search icon? <span class="glyphicon glyphicon-search"></span> 
  11. Which class is used to create a badge? .badge 
  12. Which class is used to create a basic pagination? .pagination 
  13. Which class is used to create a basic list group? .list-group 
  14. Which class adds a heading to a panel? .panel-heading 
  15. Which class indicates a dropdown menu? .dropdown 
  16. A standard navigation tab is created with: <ul class="nav nav-tabs"> 
  17. A standard navigation bar is created with: <nav class="navbar navbar-default"> 
  18. Which class is used to create a black navigation bar? .navbar-inverse 
  19. Which plugin is used to cycle through elements, like a slideshow? Carousel 
  20. Which plugin is used to create a modal window? Modal 
  21. Which plugin is used to create a tooltip? Tooltip 
  22. Which contextual class indicates a succesful or positive action? .text-success 
  23. Which contextual class indicates a dangerous or potentially negative action? .text-danger 
  24. Which class indicates uppercased text? .text-uppercase 
  25. The Bootstrap grid system works across multiple devices. True
Itulah contoh soal quiz mengenai Javascript, PHP, dan Bootstrap. semoga contoh soal quiz dan jawabannya tersebut dapan membantu kalian dalam menjawab soal dan menambah pengetahuan kalian. Terimakasih telah berkunjung, jangan lupa untuk selalu kunjungi fivser.com, sampai jumpa di artikel lainnya.