Home Page
(current)
Lessons
Articles
Online Programs
Online Programs
->
Programming
->
Programming
Freemarker Template Quiz
10 Questions
15 Questions
20 Questions
30 Questions
Question 1 (1 Points)
เครื่องหมาย `!` ใน `${variable!}` มีวัตถุประสงค์เพื่ออะไร?
(1)
กำหนดค่า default ถ้าตัวแปรไม่มีค่า
(2)
แสดงค่าของตัวแปรเสมอ ไม่ว่าจะมีหรือไม่มี
(3)
แสดง error ถ้าตัวแปรไม่มีค่า
(4)
สร้าง loop
Question 2 (1 Points)
วิธีการรวม template อื่นใน Freemarker คือ?**
(1)
`<#import>`
(2)
`<#include>`
(3)
`<#add>`
(4)
`<#append>`
Question 3 (1 Points)
ภายใน template, การเข้าถึง element ของ map ที่มี key เป็น "name" คือ ...
(1)
${map[name]}
(2)
${map.name}
(3)
map.get(name)
(4)
map->name
Question 4 (1 Points)
หากต้องการทำ loop ใน Freemarker ควรใช้ directive ใด?
(1)
<#foreach>
(2)
<#iterate>
(3)
<#loop>
(4)
<#list>
Question 5 (1 Points)
ถ้าต้องการทำ loop ผ่านรายการของ users, คำสั่งใดที่ถูกต้อง?
(1)
<#loop user in users> ...
(2)
<#foreach user in users> ...
(3)
<#for user : users> ...
(4)
<#list users as user> ... #list>
Question 6 (1 Points)
วิธีการแสดงตัวแปร `name` คือ ...
(1)
[name]
(2)
${name}
(3)
(name)
(4)
name{}
Question 7 (1 Points)
การใส่ comment ใน Freemarker template ที่จะไม่แสดงในผลลัพธ์สุดท้าย ควรใช้ syntax ใด?
(1)
(2)
// Comment
(3)
-- Comment --
(4)
<#-- Comment -->
Question 8 (1 Points)
แท็กไหนที่ใช้สำหรับการรวม templates อื่นเข้ามาใน template หลัก?**
(1)
<#insert>
(2)
<#include>
(3)
<#combine>
(4)
<#merge>
Question 9 (1 Points)
ตัว directive ไหนใช้สำหรับการกำหนดเงื่อนไข?**
(1)
<#switch>
(2)
<#case>
(3)
<#if>
(4)
<#condition>
Question 10 (1 Points)
ใน Freemarker, ตัวแปรสามารถประกาศได้โดยใช้สัญลักษณ์ใด?**
(1)
$(variable)
(2)
@@variable@@
(3)
${variable}
(4)
&&variable&&
You got
/ 10
Viewers : 6,973
Other Programs
Freemarker Template Quiz
Lessons
Articles
Online Programs