Skip to content

Commit d62ecc6

Browse files
Added new post "Commonly used JavaScript String, Array, and Object methods"
1 parent 42f5f42 commit d62ecc6

File tree

2 files changed

+75
-78
lines changed

2 files changed

+75
-78
lines changed

Gemfile.lock

Lines changed: 72 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (4.2.11.1)
5-
i18n (~> 0.7)
4+
activesupport (5.2.4.2)
5+
concurrent-ruby (~> 1.0, >= 1.0.2)
6+
i18n (>= 0.7, < 2)
67
minitest (~> 5.1)
7-
thread_safe (~> 0.3, >= 0.3.4)
88
tzinfo (~> 1.1)
99
addressable (2.7.0)
1010
public_suffix (>= 2.0.2, < 5.0)
@@ -15,7 +15,7 @@ GEM
1515
colorator (1.1.0)
1616
commonmarker (0.17.13)
1717
ruby-enum (~> 0.5)
18-
concurrent-ruby (1.1.5)
18+
concurrent-ruby (1.1.6)
1919
dnsruby (1.61.3)
2020
addressable (~> 2.5)
2121
em-websocket (0.5.1)
@@ -25,33 +25,32 @@ GEM
2525
ffi (>= 1.3.0)
2626
eventmachine (1.2.7)
2727
execjs (2.7.0)
28-
faraday (0.17.1)
28+
faraday (1.0.1)
2929
multipart-post (>= 1.2, < 3)
30-
ffi (1.11.3)
30+
ffi (1.12.2)
3131
forwardable-extended (2.6.0)
3232
gemoji (3.0.1)
33-
github-pages (202)
34-
activesupport (= 4.2.11.1)
33+
github-pages (204)
3534
github-pages-health-check (= 1.16.1)
3635
jekyll (= 3.8.5)
37-
jekyll-avatar (= 0.6.0)
36+
jekyll-avatar (= 0.7.0)
3837
jekyll-coffeescript (= 1.1.1)
3938
jekyll-commonmark-ghpages (= 0.1.6)
4039
jekyll-default-layout (= 0.1.4)
41-
jekyll-feed (= 0.11.0)
40+
jekyll-feed (= 0.13.0)
4241
jekyll-gist (= 1.5.0)
43-
jekyll-github-metadata (= 2.12.1)
44-
jekyll-mentions (= 1.4.1)
45-
jekyll-optional-front-matter (= 0.3.0)
42+
jekyll-github-metadata (= 2.13.0)
43+
jekyll-mentions (= 1.5.1)
44+
jekyll-optional-front-matter (= 0.3.2)
4645
jekyll-paginate (= 1.1.0)
47-
jekyll-readme-index (= 0.2.0)
48-
jekyll-redirect-from (= 0.14.0)
49-
jekyll-relative-links (= 0.6.0)
50-
jekyll-remote-theme (= 0.4.0)
46+
jekyll-readme-index (= 0.3.0)
47+
jekyll-redirect-from (= 0.15.0)
48+
jekyll-relative-links (= 0.6.1)
49+
jekyll-remote-theme (= 0.4.1)
5150
jekyll-sass-converter (= 1.5.2)
52-
jekyll-seo-tag (= 2.5.0)
53-
jekyll-sitemap (= 1.2.0)
54-
jekyll-swiss (= 0.4.0)
51+
jekyll-seo-tag (= 2.6.1)
52+
jekyll-sitemap (= 1.4.0)
53+
jekyll-swiss (= 1.0.0)
5554
jekyll-theme-architect (= 0.1.1)
5655
jekyll-theme-cayman (= 0.1.1)
5756
jekyll-theme-dinky (= 0.1.1)
@@ -61,27 +60,26 @@ GEM
6160
jekyll-theme-midnight (= 0.1.1)
6261
jekyll-theme-minimal (= 0.1.1)
6362
jekyll-theme-modernist (= 0.1.1)
64-
jekyll-theme-primer (= 0.5.3)
63+
jekyll-theme-primer (= 0.5.4)
6564
jekyll-theme-slate (= 0.1.1)
6665
jekyll-theme-tactile (= 0.1.1)
6766
jekyll-theme-time-machine (= 0.1.1)
68-
jekyll-titles-from-headings (= 0.5.1)
69-
jemoji (= 0.10.2)
67+
jekyll-titles-from-headings (= 0.5.3)
68+
jemoji (= 0.11.1)
7069
kramdown (= 1.17.0)
71-
liquid (= 4.0.0)
72-
listen (= 3.1.5)
70+
liquid (= 4.0.3)
7371
mercenary (~> 0.3)
74-
minima (= 2.5.0)
72+
minima (= 2.5.1)
7573
nokogiri (>= 1.10.4, < 2.0)
76-
rouge (= 3.11.0)
74+
rouge (= 3.13.0)
7775
terminal-table (~> 1.4)
7876
github-pages-health-check (1.16.1)
7977
addressable (~> 2.3)
8078
dnsruby (~> 1.60)
8179
octokit (~> 4.0)
8280
public_suffix (~> 3.0)
8381
typhoeus (~> 1.3)
84-
html-pipeline (2.12.2)
82+
html-pipeline (2.12.3)
8583
activesupport (>= 2)
8684
nokogiri (>= 1.4)
8785
http_parser.rb (0.6.0)
@@ -100,8 +98,8 @@ GEM
10098
pathutil (~> 0.9)
10199
rouge (>= 1.7, < 4)
102100
safe_yaml (~> 1.0)
103-
jekyll-avatar (0.6.0)
104-
jekyll (~> 3.0)
101+
jekyll-avatar (0.7.0)
102+
jekyll (>= 3.0, < 5.0)
105103
jekyll-coffeescript (1.1.1)
106104
coffee-script (~> 2.2)
107105
coffee-script-source (~> 1.11.1)
@@ -114,36 +112,36 @@ GEM
114112
rouge (>= 2.0, < 4.0)
115113
jekyll-default-layout (0.1.4)
116114
jekyll (~> 3.0)
117-
jekyll-feed (0.11.0)
118-
jekyll (~> 3.3)
115+
jekyll-feed (0.13.0)
116+
jekyll (>= 3.7, < 5.0)
119117
jekyll-gist (1.5.0)
120118
octokit (~> 4.2)
121-
jekyll-github-metadata (2.12.1)
122-
jekyll (~> 3.4)
119+
jekyll-github-metadata (2.13.0)
120+
jekyll (>= 3.4, < 5.0)
123121
octokit (~> 4.0, != 4.4.0)
124-
jekyll-mentions (1.4.1)
122+
jekyll-mentions (1.5.1)
125123
html-pipeline (~> 2.3)
126-
jekyll (~> 3.0)
127-
jekyll-optional-front-matter (0.3.0)
128-
jekyll (~> 3.0)
124+
jekyll (>= 3.7, < 5.0)
125+
jekyll-optional-front-matter (0.3.2)
126+
jekyll (>= 3.0, < 5.0)
129127
jekyll-paginate (1.1.0)
130-
jekyll-readme-index (0.2.0)
131-
jekyll (~> 3.0)
132-
jekyll-redirect-from (0.14.0)
133-
jekyll (~> 3.3)
134-
jekyll-relative-links (0.6.0)
135-
jekyll (~> 3.3)
136-
jekyll-remote-theme (0.4.0)
128+
jekyll-readme-index (0.3.0)
129+
jekyll (>= 3.0, < 5.0)
130+
jekyll-redirect-from (0.15.0)
131+
jekyll (>= 3.3, < 5.0)
132+
jekyll-relative-links (0.6.1)
133+
jekyll (>= 3.3, < 5.0)
134+
jekyll-remote-theme (0.4.1)
137135
addressable (~> 2.0)
138-
jekyll (~> 3.5)
139-
rubyzip (>= 1.2.1, < 3.0)
136+
jekyll (>= 3.5, < 5.0)
137+
rubyzip (>= 1.3.0)
140138
jekyll-sass-converter (1.5.2)
141139
sass (~> 3.4)
142-
jekyll-seo-tag (2.5.0)
143-
jekyll (~> 3.3)
144-
jekyll-sitemap (1.2.0)
145-
jekyll (~> 3.3)
146-
jekyll-swiss (0.4.0)
140+
jekyll-seo-tag (2.6.1)
141+
jekyll (>= 3.3, < 5.0)
142+
jekyll-sitemap (1.4.0)
143+
jekyll (>= 3.7, < 5.0)
144+
jekyll-swiss (1.0.0)
147145
jekyll-theme-architect (0.1.1)
148146
jekyll (~> 3.5)
149147
jekyll-seo-tag (~> 2.0)
@@ -171,8 +169,8 @@ GEM
171169
jekyll-theme-modernist (0.1.1)
172170
jekyll (~> 3.5)
173171
jekyll-seo-tag (~> 2.0)
174-
jekyll-theme-primer (0.5.3)
175-
jekyll (~> 3.5)
172+
jekyll-theme-primer (0.5.4)
173+
jekyll (> 3.5, < 5.0)
176174
jekyll-github-metadata (~> 2.9)
177175
jekyll-seo-tag (~> 2.0)
178176
jekyll-theme-slate (0.1.1)
@@ -184,42 +182,41 @@ GEM
184182
jekyll-theme-time-machine (0.1.1)
185183
jekyll (~> 3.5)
186184
jekyll-seo-tag (~> 2.0)
187-
jekyll-titles-from-headings (0.5.1)
188-
jekyll (~> 3.3)
185+
jekyll-titles-from-headings (0.5.3)
186+
jekyll (>= 3.3, < 5.0)
189187
jekyll-watch (2.2.1)
190188
listen (~> 3.0)
191-
jemoji (0.10.2)
189+
jemoji (0.11.1)
192190
gemoji (~> 3.0)
193191
html-pipeline (~> 2.2)
194-
jekyll (~> 3.0)
192+
jekyll (>= 3.0, < 5.0)
195193
kramdown (1.17.0)
196-
liquid (4.0.0)
197-
listen (3.1.5)
198-
rb-fsevent (~> 0.9, >= 0.9.4)
199-
rb-inotify (~> 0.9, >= 0.9.7)
200-
ruby_dep (~> 1.2)
194+
liquid (4.0.3)
195+
listen (3.2.1)
196+
rb-fsevent (~> 0.10, >= 0.10.3)
197+
rb-inotify (~> 0.9, >= 0.9.10)
201198
mercenary (0.3.6)
202199
mini_portile2 (2.4.0)
203-
minima (2.5.0)
204-
jekyll (~> 3.5)
200+
minima (2.5.1)
201+
jekyll (>= 3.5, < 5.0)
205202
jekyll-feed (~> 0.9)
206203
jekyll-seo-tag (~> 2.1)
207-
minitest (5.13.0)
204+
minitest (5.14.0)
208205
multipart-post (2.1.1)
209-
nokogiri (1.10.5)
206+
nokogiri (1.10.9)
210207
mini_portile2 (~> 2.4.0)
211-
octokit (4.14.0)
208+
octokit (4.18.0)
209+
faraday (>= 0.9)
212210
sawyer (~> 0.8.0, >= 0.5.3)
213211
pathutil (0.16.2)
214212
forwardable-extended (~> 2.6)
215213
public_suffix (3.1.1)
216214
rb-fsevent (0.10.3)
217-
rb-inotify (0.10.0)
215+
rb-inotify (0.10.1)
218216
ffi (~> 1.0)
219-
rouge (3.11.0)
220-
ruby-enum (0.7.2)
217+
rouge (3.13.0)
218+
ruby-enum (0.8.0)
221219
i18n
222-
ruby_dep (1.5.0)
223220
rubyzip (1.3.0)
224221
safe_yaml (1.0.5)
225222
sass (3.7.4)
@@ -235,15 +232,15 @@ GEM
235232
thread_safe (0.3.6)
236233
typhoeus (1.3.1)
237234
ethon (>= 0.9.0)
238-
tzinfo (1.2.5)
235+
tzinfo (1.2.7)
239236
thread_safe (~> 0.1)
240-
unicode-display_width (1.6.0)
237+
unicode-display_width (1.7.0)
241238

242239
PLATFORMS
243240
ruby
244241

245242
DEPENDENCIES
246-
github-pages (= 202)
243+
github-pages (= 204)
247244

248245
BUNDLED WITH
249246
1.16.6

_posts/2019-11-28-Commonly used JavaScript functions.markdown renamed to _posts/2020-04-11-Commonly used JavaScript functions.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: post
33
title: "Commonly used JavaScript String, Array, and Object methods"
4-
date: 2019-11-28 10:00:00 +0530
4+
date: 2020-04-11 16:00:00 -0700
55
tags: [JavaScript, functions, methods]
66
comments: true
77
---
@@ -34,14 +34,14 @@ Following are some of the common methods from the [Array][Array] global object.
3434

3535
Just like with `String` methods, use `indexOf()` if you need the position of the value in the array. Use `includes()` if you are only concerned whether the value exists, it makes intent of the code more clear.
3636

37-
`indexOf()` and `includes()` use [strict equality][Strict equality] (the same method used by the === or triple-equals operator) for comparing the search element with the elements of the Array. So, when used on an array containing objects, object references are compared not the actual values.
37+
`indexOf()` and `includes()` use [strict equality][Strict equality] (the same method used by the triple-equals operator ===) for comparing the search element with the elements of the Array. So, when used on an array containing objects, object references are compared not the actual values.
3838

3939
Therefore, when dealing with array of objects, use `some()`, `find()`, or `findIndex()` methods.
4040

4141
- [find()][Array.prototype.find()] - This method returns the value of the first element in the array that satisfies the provided testing function. Otherwise, `undefined` is returned.
4242
- [findIndex()][Array.prototype.findIndex()] - This method returns the index of the first element in the array that satisfies the provided testing function. Otherwise, it returns -1.
4343
- [some()][Array.prototype.some()] - This method tests whether **at least one element** in the array passes the test implemented by the provided function. It returns _true_ or _false_ appropriately.
44-
- [every()][Array.prototype.every()] - This method tests whether **all elements** in the array passes the test implemented by the provided function. It returns _true_ or _false_ appropriately.
44+
- [every()][Array.prototype.every()] - This method tests whether **all elements** in the array pass the test implemented by the provided function. It returns _true_ or _false_ appropriately.
4545

4646
Following methods are used for filtering and transforming an array.
4747

0 commit comments

Comments
 (0)