DEV Community

JavaScript: Data Structures (Part 2 - Sets)

Banesa Guaderrama on November 27, 2018

Data Structures: Arrays, Sets, and Maps. Data structure was defined in the part 1 of a series of 3 blogs that includes Arrays (Part 1), Sets (Pa...
Collapse
 
rnrnshn profile image
Olimpio

To .size( ) pops an error on the console

arrow.size is not a function

Collapse
 
banesag profile image
Banesa Guaderrama

Hi Olimpio - You are right, .size is not a valid method. It was used by jQuery.

Note: The size() method was deprecated in version 1.8 and removed in jQuery version 3.0. Use the length property instead.

Thanks for taking the time of reading and comment!

Collapse
 
purvajain profile image
PurvaJain

just use arrow.size

Collapse
 
changzhao profile image
Chang Zhao

Is there an error?

const letters = new Set ( ) .add ( ‘the’) .add (‘quick’) .add (‘brown’) .add (‘fox’)
words

Did you mean "const words"?

Collapse
 
zdh3 profile image
Zach Handler

Where did 'repeatedArray' come from in your last example??