# programming

**URL:** https://forum.kirupa.com/c/programming/41.md?page=39

[Latest](https://forum.kirupa.com/latest.md) · [Categories](https://forum.kirupa.com/categories.md)

**Page:** 40

---

## [JS Tip of the Day: Closure Scopes Limit Closure Variables](https://forum.kirupa.com/t/js-tip-of-the-day-closure-scopes-limit-closure-variables/643340)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 22, 2020, 4:04pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-closure-scopes-limit-closure-variables/643340 "2020-06-22T16:04:27Z")

</div>

Closure Scopes Limit Closure Variables Level: Advanced Closures are functions associated with a lexical environment. Lexical environments store variables in a scope. They also store a reference to their parent enviro…

---

## [A Visual Introduction to Arrays](https://forum.kirupa.com/t/a-visual-introduction-to-arrays/643332)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 0\
**Last updated:** [June 22, 2020, 4:28am UTC](https://forum.kirupa.com/t/a-visual-introduction-to-arrays/643332 "2020-06-22T04:28:16Z")

</div>

This is a companion discussion topic for the original entry at https://www.kirupa.com/javascript/visual\_guide\_arrays.htm

---

## [ECMAScript® 2020 Language Specification Approved](https://forum.kirupa.com/t/ecmascript-2020-language-specification-approved/643311)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 20, 2020, 12:53pm UTC](https://forum.kirupa.com/t/ecmascript-2020-language-specification-approved/643311 "2020-06-20T12:53:48Z")

</div>

The 11th edition of the ECMAScript® Language Specification, ES2020, has been officially approved and published to: http://www.ecma-international.org/publications/standards/Ecma-262.htm New features include: String.pro…

---

## [JS Tip of the Day: Function Name Bindings](https://forum.kirupa.com/t/js-tip-of-the-day-function-name-bindings/643299)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 18, 2020, 1:19pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-function-name-bindings/643299 "2020-06-18T13:19:22Z")

</div>

Function Name Bindings Level: Intermediate Named function expressions have an interesting behavior where they’ll create a variable binding of the function name with the function object local to the function body. This…

---

## [Events in JavaScript](https://forum.kirupa.com/t/events-in-javascript/352071)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 1\
**Last updated:** [June 17, 2020, 10:20am UTC](https://forum.kirupa.com/t/events-in-javascript/352071 "2020-06-17T10:20:30Z")

</div>

In this introductory tutorial, learn all about why events are useful and how you can use functions like addEventListener to take full advantage of them. This is a companion discussion topic for the original entry at ht…

---

## [How to add support for async/await in old browsers.](https://forum.kirupa.com/t/how-to-add-support-for-async-await-in-old-browsers/643277)

<div class="topic-metadata">

**Author:** [@kn7](https://forum.kirupa.com/u/kn7)\
**Replies:** 6\
**Last updated:** [June 16, 2020, 6:52pm UTC](https://forum.kirupa.com/t/how-to-add-support-for-async-await-in-old-browsers/643277 "2020-06-16T18:52:39Z")

</div>

I want to add support for async/await in javascript for firefox v47. So that I can use async function () { await something; } \[Can I use–Browser support tables for modern web technologies.\] Async functions says that fir…

---

## [JS Tip of the Day: The debugger Statement](https://forum.kirupa.com/t/js-tip-of-the-day-the-debugger-statement/643281)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 16, 2020, 1:23pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-the-debugger-statement/643281 "2020-06-16T13:23:29Z")

</div>

The debugger Statement Level: Intermediate Code doesn’t always work the way it should and sometimes you need to step through the code line by line to figure out what’s going wrong. Debuggers provide this ability, allo…

---

## [JS Tip of the Day: Mixing class and function Constructors](https://forum.kirupa.com/t/js-tip-of-the-day-mixing-class-and-function-constructors/643264)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 14, 2020, 1:46pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-mixing-class-and-function-constructors/643264 "2020-06-14T13:46:45Z")

</div>

Mixing class and function Constructors Version: ES2015 (class, Reflect) Level: Advanced For the most part, when creating your own constructor functions, you’re going to want to prefer the class syntax. It’s cleaner s…

---

## [Forums Have Themes Too!](https://forum.kirupa.com/t/forums-have-themes-too/643224)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 7\
**Last updated:** [June 12, 2020, 11:12am UTC](https://forum.kirupa.com/t/forums-have-themes-too/643224 "2020-06-12T11:12:27Z")

</div>

It’s a bit undiscoverable right now, but if you go to your user preferences, you can select from a handful of themes created by the Discourse community: There is an extension to Discourse that will get the themes to …

---

## [Creating Circles using Radial Gradients](https://forum.kirupa.com/t/creating-circles-using-radial-gradients/643242)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 1\
**Last updated:** [June 11, 2020, 12:00am UTC](https://forum.kirupa.com/t/creating-circles-using-radial-gradients/643242 "2020-06-11T00:00:05Z")

</div>

by kirupa | filed under Web Apps This is a companion discussion topic for the original entry at https://www.kirupa.com//css/circles\_radial\_gradient.htm

---

## [Array manipulation, difference between array and array object](https://forum.kirupa.com/t/array-manipulation-difference-between-array-and-array-object/643237)

<div class="topic-metadata">

**Author:** [@Umair\_Ashraf](https://forum.kirupa.com/u/Umair_Ashraf)\
**Replies:** 3\
**Last updated:** [June 10, 2020, 3:16pm UTC](https://forum.kirupa.com/t/array-manipulation-difference-between-array-and-array-object/643237 "2020-06-10T15:16:31Z")

</div>

Hi guys, i am trying to add two values at a specific index and places it back into an array, but the compiler is coming up with some Run time error… not sure if i am doing it correct. also if any one can clarify please…

---

## [JS Tip of the Day: JSON Reviver Function](https://forum.kirupa.com/t/js-tip-of-the-day-json-reviver-function/643241)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 10, 2020, 1:23pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-json-reviver-function/643241 "2020-06-10T13:23:15Z")

</div>

JSON Reviver Function Level: Intermediate Just as you can control how JSON is created in JSON.stringify() using toJSON() methods in your objects, so too can you control how JSON strings are converted into objects in JS…

---

## [kirupa.com - Creating an Application Bar, Page 3](https://forum.kirupa.com/t/kirupa-com-creating-an-application-bar-page-3/643238)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 0\
**Last updated:** [June 10, 2020, 10:51am UTC](https://forum.kirupa.com/t/kirupa-com-creating-an-application-bar-page-3/643238 "2020-06-10T10:51:31Z")

</div>

by kirupa | 19 September 2010 Have questions? Discuss this Windows Phone tutorial with others on the forums. This is a companion discussion topic for the original entry at https://www.kirupa.com/windowsphone/c…

---

## [Passing random generated numbers](https://forum.kirupa.com/t/passing-random-generated-numbers/643228)

<div class="topic-metadata">

**Author:** [@Isaac\_Feldman](https://forum.kirupa.com/u/Isaac_Feldman)\
**Replies:** 4\
**Last updated:** [June 10, 2020, 7:41am UTC](https://forum.kirupa.com/t/passing-random-generated-numbers/643228 "2020-06-10T07:41:16Z")

</div>

i am struggling to plug the random generate numbers into the next function - what am I doing wrong? Codepen link

---

## [JS Tip of the Day: Trailing Commas](https://forum.kirupa.com/t/js-tip-of-the-day-trailing-commas/643200)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 7, 2020, 1:46pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-trailing-commas/643200 "2020-06-07T13:46:24Z")

</div>

Trailing Commas Version: ES2015 (destructuring, import, export), ES2017 (functions) Level: Intermediate In certain list-like syntaxes JavaScript supports trailing commas. Trailing commas are commas at the end of a li…

---

## [Understanding Simple API call](https://forum.kirupa.com/t/understanding-simple-api-call/643189)

<div class="topic-metadata">

**Author:** [@Umair\_Ashraf](https://forum.kirupa.com/u/Umair_Ashraf)\
**Replies:** 1\
**Last updated:** [June 5, 2020, 8:12pm UTC](https://forum.kirupa.com/t/understanding-simple-api-call/643189 "2020-06-05T20:12:12Z")

</div>

Hi guys, Currently i am trying to understand about the API calls, i am fetching the data and i understand it will return as a promise and that promise contains the data and on that JSON-data i can use .json to convert i…

---

## [Hide submenus when I scroll page](https://forum.kirupa.com/t/hide-submenus-when-i-scroll-page/643023)

<div class="topic-metadata">

**Author:** [@Mary\_Pieroszkiewicz](https://forum.kirupa.com/u/Mary_Pieroszkiewicz)\
**Replies:** 5\
**Last updated:** [June 5, 2020, 4:58pm UTC](https://forum.kirupa.com/t/hide-submenus-when-i-scroll-page/643023 "2020-06-05T16:58:25Z")

</div>

I need to do this functionality in navigation menu - submenu lists. When scrolls down the page, the submenu is to hide http://www.marypieroszkiewicz.com/3n\_solution/ This is my code for menu-submenu const menu =…

---

## [JS Tip of the Day: A Function's Home Object](https://forum.kirupa.com/t/js-tip-of-the-day-a-functions-home-object/643187)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 5, 2020, 1:12pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-a-functions-home-object/643187 "2020-06-05T13:12:55Z")

</div>

A Function’s Home Object Version: ES2015 Level: Advanced All JavaScript functions have a internal slot called \[\[HomeObject\]\]. This is used to store a function’s “home object” which is the object in which the function…

---

## [Creating DOM inner HTML from script](https://forum.kirupa.com/t/creating-dom-inner-html-from-script/643087)

<div class="topic-metadata">

**Author:** [@Umair\_Ashraf](https://forum.kirupa.com/u/Umair_Ashraf)\
**Replies:** 7\
**Last updated:** [June 4, 2020, 7:00pm UTC](https://forum.kirupa.com/t/creating-dom-inner-html-from-script/643087 "2020-06-04T19:00:14Z")

</div>

Hi Guys, i am having difficulty understanding the below code(the code works fine), i means how can we read the \\' (\\'' + id + '\\') when writing the inner HTML from the Js file. i mean why we add \\' to (' + id + ') in t…

---

## [JS Tip of the Day: Custom Serialization With toJSON](https://forum.kirupa.com/t/js-tip-of-the-day-custom-serialization-with-tojson/643071)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 3, 2020, 2:30pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-custom-serialization-with-tojson/643071 "2020-06-03T14:30:37Z")

</div>

Custom Serialization With toJSON Level: Intermediate Just like Objects have their own toString() method for determining how they’re converted (most of the time) to strings, they too can have a toJSON() method for deter…

---

## [Add reCAPTCHA v3 to my form validation](https://forum.kirupa.com/t/add-recaptcha-v3-to-my-form-validation/643067)

<div class="topic-metadata">

**Author:** [@Mary\_Pieroszkiewicz](https://forum.kirupa.com/u/Mary_Pieroszkiewicz)\
**Replies:** 1\
**Last updated:** [June 3, 2020, 5:31am UTC](https://forum.kirupa.com/t/add-recaptcha-v3-to-my-form-validation/643067 "2020-06-03T05:31:09Z")

</div>

Yesterday I experienced a crisis with my programming. I am not yet at this stage where I can easily write it. I need reCAPTCHA v3 in the form in the project. I added the code which is in Google documentation. Now I have …

---

## [javascript 2D array](https://forum.kirupa.com/t/javascript-2d-array/643062)

<div class="topic-metadata">

**Author:** [@Umair\_Ashraf](https://forum.kirupa.com/u/Umair_Ashraf)\
**Replies:** 4\
**Last updated:** [June 3, 2020, 5:21am UTC](https://forum.kirupa.com/t/javascript-2d-array/643062 "2020-06-03T05:21:39Z")

</div>

hi guys, i am working through one of the hackerrank challenge, but kind of stuck while pushing the value into INTEGER\_ARRAY, i am getting error as TypeError: Cannot read property ‘push’ of undefined. as per my understa…

---

## [spread operator(... array) + push function in Array javascript](https://forum.kirupa.com/t/spread-operator-array-push-function-in-array-javascript/643063)

<div class="topic-metadata">

**Author:** [@Umair\_Ashraf](https://forum.kirupa.com/u/Umair_Ashraf)\
**Replies:** 1\
**Last updated:** [June 2, 2020, 7:51pm UTC](https://forum.kirupa.com/t/spread-operator-array-push-function-in-array-javascript/643063 "2020-06-02T19:51:50Z")

</div>

hi guys, I am a bit confused with the two below queries, really tankful if someone can clarify my concepts. :slight\_smile: Query 1: when using spread operator in a function it de-structure and passes it as arguments …

---

## [Creating a Sliding Menu in React with React Motion](https://forum.kirupa.com/t/creating-a-sliding-menu-in-react-with-react-motion/636236)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 32\
**Last updated:** [June 2, 2020, 11:37am UTC](https://forum.kirupa.com/t/creating-a-sliding-menu-in-react-with-react-motion/636236 "2020-06-02T11:37:41Z")

</div>

by kirupa | 11 December 2016 In UIs today, sliding menus are all the rage. These menus are basically off-screen elements that slide into view when you click or tap on something that looks like an arrow, a hamburg…

---

## [Setting Drop Shadows on SVGs](https://forum.kirupa.com/t/setting-drop-shadows-on-svgs/643056)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 0\
**Last updated:** [June 2, 2020, 5:24am UTC](https://forum.kirupa.com/t/setting-drop-shadows-on-svgs/643056 "2020-06-02T05:24:08Z")

</div>

This is a companion discussion topic for the original entry at https://www.kirupa.com/css/shadows\_svg.htm

---

## [JS Tip of the Day: String Conversions in Depth](https://forum.kirupa.com/t/js-tip-of-the-day-string-conversions-in-depth/643047)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [June 1, 2020, 1:51pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-string-conversions-in-depth/643047 "2020-06-01T13:51:15Z")

</div>

String Conversions in Depth Version: ES2015 (Symbol, Symbol.toPrimitive) Level: Advanced Converting values to strings is such a trivial thing, it’s easy to overlook the complexities of it. That is, maybe, at least un…

---

## [Controlling fonts (in a div\_ in reactjs](https://forum.kirupa.com/t/controlling-fonts-in-a-div-in-reactjs/643039)

<div class="topic-metadata">

**Author:** [@SunbeamRapier](https://forum.kirupa.com/u/SunbeamRapier)\
**Replies:** 1\
**Last updated:** [June 1, 2020, 5:41am UTC](https://forum.kirupa.com/t/controlling-fonts-in-a-div-in-reactjs/643039 "2020-06-01T05:41:13Z")

</div>

I saw you had another article along these lines, but using the old class structure in reactJS. I am trying to figure out how to control the font in a div so that I can change it on mouse-over and on mouse-click. I am u…

---

## [JS Tip of the Day: Copying Accessor Properties](https://forum.kirupa.com/t/js-tip-of-the-day-copying-accessor-properties/642997)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 0\
**Last updated:** [May 28, 2020, 2:29pm UTC](https://forum.kirupa.com/t/js-tip-of-the-day-copying-accessor-properties/642997 "2020-05-28T14:29:19Z")

</div>

Copying Accessor Properties Version: ES2015 (Object.assign), ES2017 (Object.getOwnPropertyDescriptors) Level: Intermediate In using Object.assign() to copy properties into an object, you’re assigning new properties mu…

---

## [What is UI Virtualization?](https://forum.kirupa.com/t/what-is-ui-virtualization/642986)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 0\
**Last updated:** [May 27, 2020, 7:24am UTC](https://forum.kirupa.com/t/what-is-ui-virtualization/642986 "2020-05-27T07:24:32Z")

</div>

This is a companion discussion topic for the original entry at https://www.kirupa.com/hodgepodge/ui\_virtualization.htm

---

## [.map and .filter methods confusion with return statement javascript](https://forum.kirupa.com/t/map-and-filter-methods-confusion-with-return-statement-javascript/642981)

<div class="topic-metadata">

**Author:** [@Umair\_Ashraf](https://forum.kirupa.com/u/Umair_Ashraf)\
**Replies:** 2\
**Last updated:** [May 26, 2020, 5:07pm UTC](https://forum.kirupa.com/t/map-and-filter-methods-confusion-with-return-statement-javascript/642981 "2020-05-26T17:07:20Z")

</div>

Hi Guys, I am a bit struggling with the return for the below two scenarios, using .map and .filter functions. why the return statement when using the .filter methods return the items in the items array rather then boll…

[Previous page](https://forum.kirupa.com/c/programming/41.md?page=38)

[Next page](https://forum.kirupa.com/c/programming/41.md?page=40)
