Sass map-has-key() Function
You are Here:
Sass map-has-key() Function
The map-has-key()
function returns whether a map contains a value associated with a key.
Example
SASS TO CSS CONVERTER
$font-weights: ("regular": 400, "medium": 500, "bold": 700);
@debug map-has-key($font-weights, "regular"); // true
@debug map-has-key($font-weights, "bolder"); // false
Syntax
map-has-key($map, $key)
Parameter Value
Value | Type | Explanation |
---|---|---|
$map | Required | Specifies an array. |
$key | Required | Specifies a key in an array. |
Return Value
Value | Explanation |
---|---|
bool | Returns whether $map contains a value associated with $key. |
Reminder
Hi Developers, we almost covered 99.1% of Sass Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in Sass.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.