From cd95d18c5b2b12100efe66b2b638e545711df3a1 Mon Sep 17 00:00:00 2001 From: Gideon Cameron Date: Thu, 16 Jan 2025 21:17:14 -0800 Subject: [PATCH] Included some str prototypes --- languages/javascript.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/languages/javascript.js b/languages/javascript.js index 9cd3978..3f15713 100644 --- a/languages/javascript.js +++ b/languages/javascript.js @@ -99,3 +99,10 @@ arr.reduce(callback[, initialValue]) // Apply a function against arr.reduceRight(callback[, initialValue]) // Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value. arr.some(callback[, initialValue]) // Returns true if at least one element in this array satisfies the provided testing function. arr.values() // Returns a new Array Iterator object that contains the values for each index in the array. + + +// String.prototype.startsWith() +str.startsWith(searchString[, position]) // Checks if the string starts with the given characters. +str.endsWith(searchString[, length]) // Checks if the string ends with the given characters. +str.includes(searchString[, position]) // Checks if the string contains the given characters. +str.repeat(count) // Repeats the string for the specified number of times.