Sign in
Log inSign up
Sumudu Siriwardana

111 likes

1.1K reads

12 comments

Livia Hooson
Livia Hooson
Nov 23, 2021

I came to JavaScript from a Python background and in Python, we have the count method of the list class, what it does is that, it takes a parameter and returns the number of times the parameter appears in the array. So how to do that in JavaScript?

2
1 reply
Sumudu Siriwardana
Sumudu Siriwardana
Author
Nov 26, 2021

Hi Livia, this answer might help you 馃槉

stackoverflow.com/a/6121234

1
Hassib Moddasser
Hassib Moddasser
Nov 22, 2021

Well explained!

Thank you, Sumudu!

1
1 reply
Sumudu Siriwardana
Sumudu Siriwardana
Author
Nov 22, 2021

Thank you, I'm glad to hear that! 馃槉

1
Akebu
Akebu
Nov 22, 2021

Great article Sumudu, you explained what an array in such simple terms馃

1
1 reply
Sumudu Siriwardana
Sumudu Siriwardana
Author
Nov 23, 2021

Thank you, Akebu! Glad to hear that! 馃槉

1
Ahnaf Ahamed
Ahnaf Ahamed
Nov 23, 2021

A refresher on Js arrays for me! Awesome article

1
1 reply
Sumudu Siriwardana
Sumudu Siriwardana
Author
Nov 23, 2021

Thank you, Ahnaf! 馃槉

Eleftheria Batsou
Eleftheria Batsou
Nov 23, 2021

Excellent writing Sumudu Siriwardana 馃憦

Thank you for providing so much value!!

1
1 reply
Sumudu Siriwardana
Sumudu Siriwardana
Author
Nov 26, 2021

Thank you, Eleftheria! 馃槉

Chanel (InstincDev)
Chanel (InstincDev)
Nov 24, 2021

Star Wars and Arrays! Great Job Sumudu!!

1
1 reply
Sumudu Siriwardana
Sumudu Siriwardana
Author
Nov 26, 2021

Thank you, Chanel! 馃槉