Parameters | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 3

Parameters

Can parameters only be used inside a function?

18th Sep 2018, 1:49 PM
Zachary Burkholder
Zachary Burkholder - avatar
2 Réponses
+ 2
function param(string) { alert(string); } // Outside the function param ("Some text");
18th Sep 2018, 2:43 PM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
0
parameters are only for function and classes in js.... parameter are basically variables for functions..they can be used inside of functions only.. or if a inner function is made, inside of that function, which is inside the 1st function... look up variable scopes(function, block, global, and local)
6th Aug 2019, 2:12 PM
kay cruz
kay cruz - avatar