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)
เมื่อมีตัวแปร map ชื่อ `userInfo` และต้องการเข้าถึงค่าจาก key ชื่อ "username", คำสั่งไหนที่ถูกต้อง?**
(1)
`${userInfo.username}`
(2)
`${userInfo('username')}`
(3)
`${userInfo[username]}`
(4)
`${userInfo["username"]}`
Question 2 (1 Points)
หากต้องการทำ loop ใน Freemarker ควรใช้ directive ใด?
(1)
<#foreach>
(2)
<#iterate>
(3)
<#loop>
(4)
<#list>
Question 3 (1 Points)
การใช้ conditions ใน Freemarker ทำได้โดยใช้คำสั่งใด?
(1)
<#if ...> ...
(2)
<#condition ...> ...
(3)
<#cond ...> ...
(4)
<#switch ...> ...
Question 4 (1 Points)
วิธีการเขียน loop เพื่อวนซ้ำผ่านรายการของข้อมูลคืออะไร?
(1)
<#loop item in items>
(2)
<#each items as item>
(3)
<#list items as item>
(4)
<#foreach items as item>
Question 5 (1 Points)
Freemarker คืออะไร?
(1)
เครื่องมือสำหรับการทำ Web scraping
(2)
Framework สำหรับการพัฒนาเว็บ
(3)
Template engine สำหรับการสร้างเอกสารหรือหน้าเว็บ
(4)
Database management system
Question 6 (1 Points)
อะไรคือ directive ที่ใช้สำหรับการทำ include ของ template อื่น?
(1)
`<@include>`
(2)
`<#include>`
(3)
`<@import>`
(4)
`<#nest>`
Question 7 (1 Points)
เครื่องหมาย `!` ใน `${variable!}` มีวัตถุประสงค์เพื่ออะไร?
(1)
กำหนดค่า default ถ้าตัวแปรไม่มีค่า
(2)
แสดงค่าของตัวแปรเสมอ ไม่ว่าจะมีหรือไม่มี
(3)
แสดง error ถ้าตัวแปรไม่มีค่า
(4)
สร้าง loop
Question 8 (1 Points)
ตัวไหนไม่ใช่ built-in ของ Freemarker?
(1)
.size
(2)
.length
(3)
.cap_first
(4)
.upper_case
Question 9 (1 Points)
วิธีไหนที่ถูกต้องสำหรับการเข้าถึง value ของ key `name` ใน map `user`?
(1)
user.name
(2)
user{name}
(3)
user[name]
(4)
user-name
Question 10 (1 Points)
คำสั่งไหนที่สามารถใช้เพื่อแปลงข้อมูลเป็น string ใน Freemarker?
(1)
`asString()`
(2)
`.to_string`
(3)
`.string`
(4)
`toString()`
You got
/ 10
Viewers : 5,464
Other Programs
Freemarker Template Quiz
Lessons
Articles
Online Programs