freeCodeCamp/curriculum/challenges/arabic/08-coding-interview-prep/data-structures/use-.has-and-.size-on-an-es...

58 lines
769 B
Markdown
Raw Normal View History

---
id: 587d8255367417b2b2512c72
title: Use .has and .size on an ES6 Set
challengeType: 1
videoUrl: ''
localeTitle: ''
---
## Description
undefined
## Instructions
undefined
## Tests
<section id='tests'>
```yml
tests:
- text: ''
testString: 'assert((function(){var test = checkSet([4,5,6], 3); test === [ false, 3 ]})(), "<code>checkSet([4, 5, 6], 3)</code> should return [ false, 3 ]");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function checkSet(arrToBeSet, checkValue){
// change code below this line
// change code above this line
}
checkSet([ 1, 2, 3], 2); // Should return [ true, 3 ]
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>