JavaScript Set has() methodThe JavaScript Set has() method indicates whether the Set object contains the specified value. It returns true if the specified value is present, otherwise false. SyntaxThe has() method is represented by the following syntax: Parametervalue - It represents the value to be searched. ReturnA Boolean value. JavaScript Set has() method exampleHere, we will understand has() method through various examples. Example 1Let's see an example to determine whether the set object contains the specified value. Test it NowOutput: true Example 2Let's see one more example to determine whether the set object contains the specified value. Test it NowOutput: false false Next TopicJavaScript Set values() Method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India