Sass stands for “Syntactically Awesome StyleSheet”. Sass is a CSS pre-processor which is used to reduce repetition of CSS and therefore saves time.
SASS MCQs: This section contains SASS Multiple-Choice Questions with Answers. These SASS MCQs are written for beginners as well as advanced, practice these MCQs to enhance and test the knowledge of SASS.
List of SASS MCQs
1. Sass is a _____.
- Scripting language
- Markup language
- CSS pre-processor
- None of the above
Answer: C) CSS pre-processor
Explanation:
Sass is a CSS pre-processor.
2. Sass stands for ______.
- Syntactically Awesome Stylesheet
- Semantically Awesome Stylesheet
- Simple Awesome Stylesheet
- Syntax-based Awesome Stylesheet
Answer: A) Syntactically Awesome Stylesheet
Explanation:
Sass stands for Syntactically Awesome Stylesheet.
3. Which symbol is used to declare a variable in Sass?
- #
- &
- @
- $
Answer: D) $
Explanation:
The symbol $ is used to declare a variable in Sass.
4. Which is the correct syntax to declare a variable “myfonts” assigning the two font names?
- $myfonts: Helvetica, sans-serif;
- $myfonts: Helvetica, and sans-serif;
- $myfonts: “Helvetica, sans-serif”;
- $myfonts: “Helvetica+sans-serif”;
Answer: A) $myfonts: Helvetica, sans-serif;
Explanation:
The correct syntax to declare a variable “myfonts” assigning the two font names is,
$myfonts: Helvetica, sans-serif;
5. Which directive allows you to include the content of one file in another?
- @include
- @define
- @import
- All of the above
Answer: C) @import
Explanation:
The @import directive allows you to include the content of one file in another.
ADVERTISEMENT
6. What is the correct syntax for @import directive?
- @import -filename;
- @import +filename;
- @import filename
- @import filename;
Answer: D) @import filename;
Explanation:
The correct syntax for @import directive is,
@import filename;
7. While importing the Sass file, does file’s extension is required?
- Yes
- No
Answer: B) No
Explanation:
There is no need to specify a file extension, Sass automatically assumes that you mean a .sass or .scss file.
8. Which directive is used to create CSS code that is to be reused throughout the website?
- @import
- @mixin
- @define
- All of the above
Answer: B) @mixin
Explanation:
The @mixin directive is used to create CSS code that is to be reused throughout the website.
9. Which is the correct syntax to define a mixin?
- @mixin name { property: value; property: value; … }
- @import mixin name { property: value; property: value; … }
- @mixin name .sass{ property: value; property: value; … }
- @mixin name { @import _filename; }
Answer: A)
@mixin name { property: value; property: value; ... }
Explanation:
The correct syntax to define a mixin is:
@mixin name { property: value; property: value; ... }
10. Which directive is used to include a mixin?
- @import
- @mixin
- @define
- All of the above
Answer: A) @import
Explanation:
The @include directive is used to include a mixin.
Syntax:
selector { @include mixin-name; }
ADVERTISEMENT
https://googleads.g.doubleclick.net/pagead/ads?gdpr=0&us_privacy=1—&client=ca-pub-8685817763351539&output=html&h=280&slotname=1566490972&adk=1540418478&adf=2538046398&pi=t.ma~as.1566490972&w=336&lmt=1686914405&format=336×280&url=https%3A%2F%2Fwww.includehelp.com%2Fmcq%2Fsass-multiple-choice-questions-mcqs.aspx&wgl=1&adsid=ChEI8JCwpAYQ0q7un7O38ML4ARI5AKiwTUmo-t1cfKUbRyY3j-pDVynwINvAr2d1m9KBLA2oXgUXlHZ-Xzcg1266UdoSBHqdxb9tTGvl&uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiMTE0LjAuNTczNS4xMzQiLFtdLDAsbnVsbCwiNjQiLFtbIk5vdC5BL0JyYW5kIiwiOC4wLjAuMCJdLFsiQ2hyb21pdW0iLCIxMTQuMC41NzM1LjEzNCJdLFsiR29vZ2xlIENocm9tZSIsIjExNC4wLjU3MzUuMTM0Il1dLDBd&dt=1686914397405&bpp=1&bdt=526&idt=1&shv=r20230614&mjsv=m202306080101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D103bc9b6ca8e6923-22bd01580ce200df%3AT%3D1686913527%3ART%3D1686914397%3AS%3DALNI_MbYZYdGpwZURnNusXCjEjW56hN-3A&gpic=UID%3D00000c4fbddbaf64%3AT%3D1686913527%3ART%3D1686914397%3AS%3DALNI_MZkukRjo_0uKaHrCHWwJOVlxazjow&prev_fmts=0x0%2C336x280%2C1024x625&nras=2&correlator=2908094191846&frm=20&pv=1&ga_vid=1059989457.1686913527&ga_sid=1686914397&ga_hid=1878418128&ga_fc=1&ga_cid=120867721.1686913527&u_tz=330&u_his=1&u_h=768&u_w=1024&u_ah=728&u_aw=1024&u_cd=24&u_sd=1&dmc=8&adx=426&ady=5235&biw=1007&bih=625&scr_x=0&scr_y=2757&eid=42532278%2C44759875%2C44759926%2C42532280%2C44759837%2C31075304%2C31075306%2C42531705%2C44788441&oid=2&psts=ABHeCvgMfjsSPaUWMNb4r1tOzTEkcsHriGcgnfY_d3PJDXnQVC9EojdmEwjr7vlKjv1yR01RE6aabwZnWF5E7ynenYkK0CaR&pvsid=2554350858484164&tmod=1091379716&uas=3&nvt=1&ref=https%3A%2F%2Fwww.includehelp.com%2Fmultiple-choice-questions-mcqs.aspx&fc=1920&brdim=0%2C0%2C0%2C0%2C1024%2C0%2C1024%2C728%2C1024%2C625&vis=1&rsz=%7C%7CpoeEbr%7C&abl=CS&pfx=0&fu=0&bc=31&jar=2023-06-16-11&ifi=3&uci=a!3&btvi=2&fsb=1&xpc=hzhaU0sR59&p=https%3A//www.includehelp.com&dtd=7792
11. Can a mixin include other mixins?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, a mixin can also include other mixins.
selector { @include mixin-name; }
12. What is the correct syntax to pass two variables in a mixin?
- @mixin mixin_name(@include $variable1, @include $variable2) { properties: values;}
- @mixin mixin_name($variable1+$variable2) { properties: values;}
- @mixin mixin_name($variable1, $variable2) { properties: values;}
- @import @mixin mixin_name($variable1, $variable2) { properties: values;}
Answer: C) @mixin mixin_name($variable1, $variable2) { properties: values;}
Explanation:
The correct syntax to pass two variables in a mixin is,
@mixin mixin_name($variable1, $variable2) { properties:values;}
13. What is the correct syntax to call a mixin with two variables in a class?
- .class_name{ @include mixin_name(variabl1, variable2);}
- .class_name{ @include mixin_name(variabl1, variable2);}
- .class_name{ @include mixin_name(variabl1, variable2);}
- .class_name{ @include mixin_name(variabl1, variable2);}
Answer: A) .class_name{ @include mixin_name(variabl1, variable2);}
Explanation:
The correct syntax to call a mixin in a class is,
.class_name{ @include mixin_name(variabl1, variable2);}
Example:
.post{ @include border1(red, 1px); }
14. Is it possible to define default values to mixin variables?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, it is possible to define default values to mixin variables.
15. What is the correct syntax to define default values to mixin variables?
- @mixin mixin_name($variable: default_value, $variable: default_value) {properties: values/variables;}
- @mixin mixin_name($variable=default_value, $variable=default_value) {properties: values/variables;}
- @mixin mixin_name($variable-default_value, $variable-default_value) {properties: values/variables;}
- All of the above
Answer: A) @mixin mixin_name($variable: default_value, $variable: default_value) {properties: values/variables;}
Explanation:
The correct syntax to define default values to mixin variables is,
@mixin mixin_name($variable=default_value, $variable=default_value) {properties: values/variables;}
Example:
@mixin post($color: red, $width: 2px) { border: $width solid $color; }
ADVERTISEMENT
https://googleads.g.doubleclick.net/pagead/ads?gdpr=0&us_privacy=1—&client=ca-pub-8685817763351539&output=html&h=280&slotname=1566490972&adk=1540418478&adf=1108988602&pi=t.ma~as.1566490972&w=336&lmt=1686914408&format=336×280&url=https%3A%2F%2Fwww.includehelp.com%2Fmcq%2Fsass-multiple-choice-questions-mcqs.aspx&wgl=1&adsid=ChEI8JCwpAYQ0q7un7O38ML4ARI5AKiwTUmo-t1cfKUbRyY3j-pDVynwINvAr2d1m9KBLA2oXgUXlHZ-Xzcg1266UdoSBHqdxb9tTGvl&uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiMTE0LjAuNTczNS4xMzQiLFtdLDAsbnVsbCwiNjQiLFtbIk5vdC5BL0JyYW5kIiwiOC4wLjAuMCJdLFsiQ2hyb21pdW0iLCIxMTQuMC41NzM1LjEzNCJdLFsiR29vZ2xlIENocm9tZSIsIjExNC4wLjU3MzUuMTM0Il1dLDBd&dt=1686914397407&bpp=6&bdt=528&idt=6&shv=r20230614&mjsv=m202306080101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D103bc9b6ca8e6923-22bd01580ce200df%3AT%3D1686913527%3ART%3D1686914397%3AS%3DALNI_MbYZYdGpwZURnNusXCjEjW56hN-3A&gpic=UID%3D00000c4fbddbaf64%3AT%3D1686913527%3ART%3D1686914397%3AS%3DALNI_MZkukRjo_0uKaHrCHWwJOVlxazjow&prev_fmts=0x0%2C336x280%2C1024x625%2C336x280&nras=2&correlator=2908094191846&frm=20&pv=1&ga_vid=1059989457.1686913527&ga_sid=1686914397&ga_hid=1878418128&ga_fc=1&ga_cid=120867721.1686913527&u_tz=330&u_his=1&u_h=768&u_w=1024&u_ah=728&u_aw=1024&u_cd=24&u_sd=1&dmc=8&adx=426&ady=7825&biw=1007&bih=625&scr_x=0&scr_y=5400&eid=42532278%2C44759875%2C44759926%2C42532280%2C44759837%2C31075304%2C31075306%2C42531705%2C44788441&oid=2&psts=ABHeCvgMfjsSPaUWMNb4r1tOzTEkcsHriGcgnfY_d3PJDXnQVC9EojdmEwjr7vlKjv1yR01RE6aabwZnWF5E7ynenYkK0CaR%2CABHeCvgver5IySLKaOVKcpgyIOnFH-zAwgQSvabKrDZzr-Pd9qklUQNPgj2awDBn1olltaNHG-3W551tGnic4nQC88qIhMQz&pvsid=2554350858484164&tmod=1091379716&uas=1&nvt=1&ref=https%3A%2F%2Fwww.includehelp.com%2Fmultiple-choice-questions-mcqs.aspx&fc=1920&brdim=0%2C0%2C0%2C0%2C1024%2C0%2C1024%2C728%2C1024%2C625&vis=1&rsz=%7C%7CpoeEbr%7C&abl=CS&pfx=0&fu=0&bc=31&jar=2023-06-16-11&ifi=4&uci=a!4&btvi=3&fsb=1&xpc=SLkp0y1I6p&p=https%3A//www.includehelp.com&dtd=10766
16. Which directive is used to share a set of CSS properties from one selector to another?
- @share
- @import
- @transfer
- @extend
Answer: D) @extend
Explanation:
The @extend directive is used to share a set of CSS properties from one selector to another.
17. Which Sass function is used to add quotes to a string?
- quote(string)
- include(string)
- push(string)
- add(string)
Answer: A) quote(string)
Explanation:
The quote(string) function is used to add quotes to a string.
Example:
quote(IncludeHelp) Result: "IncludeHelp"
18. Which Sass function is used to get the index of the first occurrence of the substring within string?
- index(string, substring)
- strindex(string, substring)
- str-index(string, substring)
- get (string, substring)
Answer: C) str-index(string, substring)
Explanation:
The str-index(string, substring) function is used to get the index of the first occurrence of the substring within string.
Example:
str-index("IncludeHelp", "n") Result: 2
19. Which Sass function is used to get the string with insert inserted at the specified index position?
- insert(string, insert, index)
- str-insert(string, insert, index)
- string-insert(string, insert, index)
- strinsert(string, insert, index)
Answer: B) str-insert(string, insert, index)
Explanation:
The str-insert(string, insert, index) function is used to get the string with insert inserted at the specified index position.
Example:
str-insert("IncludeHelp", " Hello ", 1) Result: "Hello IncludeHelp"
20. Which Sass function is used to get the length of the string?
- stringlength(string)
- length(string)
- str-length(string)
- len(string)
Answer: C) str-length(string)
Explanation:
The str-length(string) function is used to get the length of the string.
Example:
str-length("IncludeHelp") Result: 11
ADVERTISEMENT
https://googleads.g.doubleclick.net/pagead/ads?gdpr=0&us_privacy=1—&client=ca-pub-8685817763351539&output=html&h=280&slotname=1566490972&adk=1540418478&adf=2722178939&pi=t.ma~as.1566490972&w=336&lmt=1686914409&format=336×280&url=https%3A%2F%2Fwww.includehelp.com%2Fmcq%2Fsass-multiple-choice-questions-mcqs.aspx&wgl=1&adsid=ChEI8JCwpAYQ0q7un7O38ML4ARI5AKiwTUmo-t1cfKUbRyY3j-pDVynwINvAr2d1m9KBLA2oXgUXlHZ-Xzcg1266UdoSBHqdxb9tTGvl&uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiMTE0LjAuNTczNS4xMzQiLFtdLDAsbnVsbCwiNjQiLFtbIk5vdC5BL0JyYW5kIiwiOC4wLjAuMCJdLFsiQ2hyb21pdW0iLCIxMTQuMC41NzM1LjEzNCJdLFsiR29vZ2xlIENocm9tZSIsIjExNC4wLjU3MzUuMTM0Il1dLDBd&dt=1686914397414&bpp=4&bdt=535&idt=4&shv=r20230614&mjsv=m202306080101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D103bc9b6ca8e6923-22bd01580ce200df%3AT%3D1686913527%3ART%3D1686914397%3AS%3DALNI_MbYZYdGpwZURnNusXCjEjW56hN-3A&gpic=UID%3D00000c4fbddbaf64%3AT%3D1686913527%3ART%3D1686914397%3AS%3DALNI_MZkukRjo_0uKaHrCHWwJOVlxazjow&prev_fmts=0x0%2C336x280%2C1024x625%2C336x280%2C336x280&nras=2&correlator=2908094191846&frm=20&pv=1&ga_vid=1059989457.1686913527&ga_sid=1686914397&ga_hid=1878418128&ga_fc=1&ga_cid=120867721.1686913527&u_tz=330&u_his=1&u_h=768&u_w=1024&u_ah=728&u_aw=1024&u_cd=24&u_sd=1&dmc=8&adx=426&ady=10491&biw=1007&bih=625&scr_x=0&scr_y=8003&eid=42532278%2C44759875%2C44759926%2C42532280%2C44759837%2C31075304%2C31075306%2C42531705%2C44788441&oid=2&psts=ABHeCvgMfjsSPaUWMNb4r1tOzTEkcsHriGcgnfY_d3PJDXnQVC9EojdmEwjr7vlKjv1yR01RE6aabwZnWF5E7ynenYkK0CaR%2CABHeCvgver5IySLKaOVKcpgyIOnFH-zAwgQSvabKrDZzr-Pd9qklUQNPgj2awDBn1olltaNHG-3W551tGnic4nQC88qIhMQz%2CABHeCvhvtGflp3cdmrWT_etP4gTuCqLf5SrBDZviiH6bbr4tUpjwpFkyodznWCeRZqnxOpuW1M-vcCZOQ1CSrLjoOU0Lksbf&pvsid=2554350858484164&tmod=1091379716&uas=1&nvt=1&ref=https%3A%2F%2Fwww.includehelp.com%2Fmultiple-choice-questions-mcqs.aspx&fc=1920&brdim=0%2C0%2C0%2C0%2C1024%2C0%2C1024%2C728%2C1024%2C625&vis=1&rsz=%7C%7CpoeEbr%7C&abl=CS&pfx=0&fu=0&bc=31&jar=2023-06-16-11&ifi=5&uci=a!5&btvi=4&fsb=1&xpc=p7kkxmqagY&p=https%3A//www.includehelp.com&dtd=12414
21. Which Sass function is used to extract the characters from the given string?
- str-slice(string, start, end)
- slice(string, start, end)
- stringslice(string, start, end)
- str-extract(string, start, end)
Answer: A) str-slice(string, start, end)
Explanation:
The str-slice(string, start, end) function is used to extract the characters from the given string.
Example:
str-slice("IncludeHelp", 3, 5) Result: "clude"
22. Which Sass function is used to convert the string to the lowercase?
- str-lower(string)
- str-lwr(string)
- str-lower-case(string)
- to-lower-case(string)
Answer: D) to-lower-case(string)
Explanation:
The to-lower-case(string) function is used to convert the string to the lowercase.
Example:
to-lower-case("IncludeHelp") Result: "includehelp"
23. Which Sass function is used to convert the string to the uppercase?
- str-upper(string)
- str-upr(string)
- str-upper-case(string)
- to-upper-case(string)
Answer: D) to-upper-case(string)
Explanation:
The to-upper-case(string) function is used to convert the string to the uppercase.
Example:
to-upper-case("IncludeHelp") Result: "INCLUDEHELP"
24. Which Sass function is used to get the unique randomly generated unquoted string?
- unique-id()
- random-id()
- random()
- unique()
Answer: A) unique-id()
Explanation:
The unique-id() function is used to get the unique randomly generated unquoted string.
Example:
unique-id() Result: syghxfrav
25. Which Sass function is used to remove quotes around string (if any)?
- unquotes(string)
- unquote(string)
- rem-quote(string)
- rem-quotes(string)
Answer: B) unquote(string)
Explanation:
The unquote(string) function is used to remove quotes around string (if any).
Example:
unquote("IncludeHelp") Result: IncludeHelp
26. Which Sass function is used to get the absolute value of the number?
- abs(number)
- num-abs(number)
- absolute(number)
- getabs(number)
Answer: A) abs(number)
Explanation:
The abs(number) function is used to get the absolute value of the number.
Example:
abs(-108) Result: 108
27. Which Sass function is used to round number up to the nearest integer?
- ceil(number)
- num-ceil(number)
- getceil(number)
- ceiling(number)
Answer: A) ceil(number)
Explanation:
The ceil(number) function is used to round number up to the nearest integer.
Example:
abs(107.20) Result: 108
28. Which Sass function is used to check whether two values are comparable or not?
- compare(num1, num2)
- equal(num1, num2)
- checkequal(num1, num2)
- comparable(num1, num2)
Answer: D) comparable(num1, num2)
Explanation:
The comparable(num1, num2) function is used to check whether two values are comparable or not.
Example:
comparable(35px, 15px) Result: true comparable(201mm, 108cm) Result: true comparable(15px, 1.5em) Result: false
29. Which Sass function is used to round number down to the nearest integer?
- floor(number)
- getfloor(number)
- round(number)
- rounddown(number)
Answer: A) floor(number)
Explanation:
The floor(number) function is used to round number down to the nearest integer.
Example:
floor(107.76) Result: 108
30. Which Sass function is used to get the maximum value from the given numbers?
- maximum(number…)
- getmax(number…)
- max(number…)
- maxvalue(number…)
Answer: C) max(number…)
Explanation:
The max(number…) function is used to get the maximum value from the given number.
Example:
max(15,1 7, 90, 0, -3) Result: 90
ADVERTISEMENT
https://googleads.g.doubleclick.net/pagead/ads?gdpr=0&us_privacy=1—&client=ca-pub-8685817763351539&output=html&h=280&slotname=1566490972&adk=1540418478&adf=3702211401&pi=t.ma~as.1566490972&w=336&lmt=1686914411&format=336×280&url=https%3A%2F%2Fwww.includehelp.com%2Fmcq%2Fsass-multiple-choice-questions-mcqs.aspx&wgl=1&adsid=ChEI8JCwpAYQ0q7un7O38ML4ARI5AKiwTUmo-t1cfKUbRyY3j-pDVynwINvAr2d1m9KBLA2oXgUXlHZ-Xzcg1266UdoSBHqdxb9tTGvl&uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiMTE0LjAuNTczNS4xMzQiLFtdLDAsbnVsbCwiNjQiLFtbIk5vdC5BL0JyYW5kIiwiOC4wLjAuMCJdLFsiQ2hyb21pdW0iLCIxMTQuMC41NzM1LjEzNCJdLFsiR29vZ2xlIENocm9tZSIsIjExNC4wLjU3MzUuMTM0Il1dLDBd&dt=1686914397427&bpp=7&bdt=548&idt=7&shv=r20230614&mjsv=m202306080101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D103bc9b6ca8e6923-22bd01580ce200df%3AT%3D1686913527%3ART%3D1686914397%3AS%3DALNI_MbYZYdGpwZURnNusXCjEjW56hN-3A&gpic=UID%3D00000c4fbddbaf64%3AT%3D1686913527%3ART%3D1686914397%3AS%3DALNI_MZkukRjo_0uKaHrCHWwJOVlxazjow&prev_fmts=0x0%2C336x280%2C1024x625%2C336x280%2C336x280%2C336x280&nras=2&correlator=2908094191846&frm=20&pv=1&ga_vid=1059989457.1686913527&ga_sid=1686914397&ga_hid=1878418128&ga_fc=1&ga_cid=120867721.1686913527&u_tz=330&u_his=1&u_h=768&u_w=1024&u_ah=728&u_aw=1024&u_cd=24&u_sd=1&dmc=8&adx=426&ady=15667&biw=1007&bih=625&scr_x=0&scr_y=13223&eid=42532278%2C44759875%2C44759926%2C42532280%2C44759837%2C31075304%2C31075306%2C42531705%2C44788441&oid=2&psts=ABHeCvgMfjsSPaUWMNb4r1tOzTEkcsHriGcgnfY_d3PJDXnQVC9EojdmEwjr7vlKjv1yR01RE6aabwZnWF5E7ynenYkK0CaR%2CABHeCvgver5IySLKaOVKcpgyIOnFH-zAwgQSvabKrDZzr-Pd9qklUQNPgj2awDBn1olltaNHG-3W551tGnic4nQC88qIhMQz%2CABHeCvhvtGflp3cdmrWT_etP4gTuCqLf5SrBDZviiH6bbr4tUpjwpFkyodznWCeRZqnxOpuW1M-vcCZOQ1CSrLjoOU0Lksbf%2CABHeCvhHrLrvPjum1ZIg96cQSubCxswrjkH0YfuBBYMvmU78mIH3ThV9WSOaUAea17VN2h3vI92L6eDknstwAyqQTkSZ5IG9&pvsid=2554350858484164&tmod=1091379716&uas=1&nvt=1&ref=https%3A%2F%2Fwww.includehelp.com%2Fmultiple-choice-questions-mcqs.aspx&fc=1920&brdim=0%2C0%2C0%2C0%2C1024%2C0%2C1024%2C728%2C1024%2C625&vis=1&rsz=%7C%7CpoeEbr%7C&abl=CS&pfx=0&fu=0&bc=31&jar=2023-06-16-11&ifi=6&uci=a!6&btvi=5&fsb=1&xpc=JYs4gZ71RA&p=https%3A//www.includehelp.com&dtd=13776
31. Which Sass function is used to get the minimum value from the given numbers?
- minimum(number…)
- getmin(number…)
- min(number…)
- minvalue(number…)
Answer: C) min(number…)
Explanation:
The min(number…) function is used to get the minimum value from the given number.
Example:
max(15,1 7, 90, 0, -3) Result: -3
32. Which Sass function is used to convert a number to a percentage?
- percentage(number)
- perc(number)
- getpercentage(number)
- getperc(number)
Answer: A) percentage(number)
Explanation:
The percentage(number) function is used to convert a number to a percentage.
Example:
percentage(4.5) Result: 450
33. Which Sass function is used to get the random number between 0 and 1?
- random(0,1)
- random()
- randomize()
- random-number()
Answer: B) random()
Explanation:
The random() function is used to get the random number between 0 and 1.
Example:
random() Result: 0.12389
34. Which Sass function is used to get the random number between 1 and the given number?
- random(number)
- random(0,number)
- randomize(0,number)
- random-number(number)
Answer: A) random(number)
Explanation:
The random(number) function is used to get the random number between 1 and the given number.
Example:
random(108) Result: 54
35. Which Sass function is used to round the given number to the nearest integer?
- random(number)
- random(0,number)
- randomize(0,number)
- random-number(number)
Answer: A) random(number)
Explanation:
The random(number) function is used to round the given number to the nearest integer.
Example:
round(108.20) Result: 108 round(108.80) Result: 109
36. Which is the correct syntax of append() function?
- append(list, [separator])
- append(value)
- append(list, value, [separator])
- append-to-list(list, value, [separator])
Answer: C) append(list, value, [separator])
Explanation:
The correct syntax to add a single value in a list is,
append(list, value, [separator])
37. Which Sass function is used to get the index position for the value in list?
- get-index(list, value)
- getindex(list, value)
- list-index(list, value)
- index(list, value)
Answer: D) index(list, value)
Explanation:
The index(list, value) function is used to get the index position for the value in list.
Example:
index(a d c, d) Result: 2
38. Which Sass function is used to check whether the list square brackets or not?
- check-bracket(list)
- check-brackets(list)
- is-bracketed(list)
- is-bracketedlis(list)
Answer: C) is-bracketed(list)
Explanation:
The is-bracketed(list) function is used to check whether the list has square brackets or not.
Example:
is-bracketed([x y z]) Result: true
39. Which Sass function is used to get a new selector containing a nested list of CSS selectors based on the list provided?
- selector-nest(selectors)
- selector-parse(selector)
- selector-replace(selector, original, replacement)
- selector-unify(selector1, selector2)
Answer: A) selector-nest(selectors)
Explanation:
The selector-nest(selectors) function is used to get a new selector containing a nested list of CSS selectors based on the list provided.
40. Which Sass function is used to get the length of the list?
- length(list)
- elements(list)
- count(list)
- countelements(list)
Answer: A) length(list)
Explanation:
The length(list) function is used to get the length of the list.
Example:
is-bracketed([x y z]) Result: 3
41. Which Sass function is used to get the separator used in the list?
- separator(list)
- get-separator(list)
- is-separator(list)
- list-separator(list)
Answer: D) list-separator(list)
Explanation:
The list-separator(list) function is used to get the separator used in the list.
Example:
list-separator([x y z]) Result: space
42. Which Sass function is used to get the Nth elements from the list?
- nth(list, n)
- element(list, n)
- list-element(list, n)
- get(list, n)
Answer: A) nth(list, n)
Explanation:
The nth(list, n) function is used to get the Nth elements from the list.
Example:
nth(x y z, 2) Result: y
43. Which Sass function is used to get the value for the specified key in the map?
- get(map, key)
- map-element(map, key)
- map-value(map, key)
- map-get(map, key)
Answer: D) map-get(map, key)
Explanation:
The nth(list, n) function is used to get the value for the specified key in the map.
Example:
$font-sizes: ("normal": 14px, "larger": 20px, "largest": 32px) map-get($font-sizes, " largest ") Result: 32px
44. Which Sass function is used to get the list of all values in map?
- values(map)
- map-values(map)
- map-elements(map)
- elements(map)
Answer: B) map-values(map)
Explanation:
The map-values(map) function is used to get the list of all values in map.
Example:
$font-sizes: ("normal": 14px, "larger": 20px, "largest": 32px) map-get($font-sizes, " largest ") Result: 14px, 20px, 32px
45. Which Sass function is used check whether the super selector matches all the elements that sub matches?
- is-superselector(super, sub)
- superselector(super, sub)
- sub-superselector(super, sub)
- map-superselector(super, sub)
Answer: A) is-superselector(super, sub)
Explanation:
The is-superselector(super, sub) function is used to check whether the super selector matches all the elements that sub matches.
Example:
is-superselector("div", "div.myvalue") Result: true is-superselector("div.myvalue", "div") Result: false