Parameters | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 3

Parameters

Can parameters only be used inside a function?

18th Sep 2018, 1:49 PM
Zachary Burkholder
Zachary Burkholder - avatar
2 Respostas
+ 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