KW Online Tools Zone
Knowledge Walls
View All Tools Home
HOW TO USE CALL BY REFERENCE IN JAVASCRIPT FUNCTIONS WITH EXAMPLE
[Javascript editor]
Run
Share Link
Clear
HTML [Ctrl+Enter] - to run
How to use call by reference in Javascript functions with Example
CSS [Ctrl+Enter] - to run
Javascript [Ctrl+Enter] - to run
function addAdditionalNames(userNames){ userNames.push("Sarathy"); userNames.push("Gopal"); userNames.push("Lakshanya"); } var userNames = new Array(); userNames.push("Raja"); userNames.push("Vijay"); userNames.push("Kumar"); document.write(userNames+"
"); addAdditionalNames(userNames); document.write(userNames+"
");
OUTPUT
Copyright © 2021 Knowledge walls, All rights reserved
Copyright © 2021 Knowledge walls, All rights reserved