Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

functions and variables javascript

/*A function is like an operation, you pass two or more values/variables 
into it, it will output a value (if return is used).
Also, you will not have to redeclare the parameters if you used arguments. */

/* A global variable can be accessed anywhere including in curly braces { }.
You do not have to list them as an argument however it is recommended */

/*            | scroll down |
              v             v     */

/* You will opt a global variable into an argument if
you want it to become a different variable in the function */

/*Use*/ let /*and*/ const /*more often because it will not allow you to
declare it again*/

/*Parameters are like the placeholder variables for the variables
outside the function being used as arguments*/

// Local variables(like in functions) take priority over global variables

/*The */return/* operator will output a value such as */ 4, "string", 
true /*etc. this will not be assigned to a variable unless you do assign it
yourself. */

/*If a*/ return /*operator is not used  it will change the global variable 
instead (if there is one).*/

// A good explenation on global and local variables is below
('  https://www.youtube.com/watch?v=iJKkZA215tQ  ')
Comment

javascript define variable

var variable1 = "some variable content";
Comment

javascript declaring variables

var myVariable = 22; 
Comment

var function js

hi = () => {}
Comment

PREVIOUS NEXT
Code Example
Javascript :: what is observable in angular 
Javascript :: ex:js 
Javascript :: passing ref to child component 
Javascript :: update column with find sequelize 
Javascript :: typedjs 
Javascript :: convert json to dart 
Javascript :: how to create angular project in visual studio code windows 10 
Javascript :: react router refreshes page 
Javascript :: == vs === javascript 
Javascript :: Expected an assignment or function call and instead saw an expression 
Javascript :: status discored jks 
Javascript :: how to generate a random number between certain values 
Javascript :: formatt json to create node and child node react 
Javascript :: tooltip in javasrript UI 
Javascript :: node search filter array of objects 
Javascript :: dart get vfirst key value of map 
Javascript :: _onResize vue leaflet 
Javascript :: ascending order sort javascript without sort function 
Javascript :: build a javascript to easily change website colours theme 
Javascript :: show conditional header based on url in vue js 
Javascript :: check presense of nmber in a string javascript 
Javascript :: angular check if array is empty 
Javascript :: nodejs json data serving 
Javascript :: how er create json data file to train our rasa model 
Javascript :: jquery clear chozen 
Javascript :: unit test for dynamodb query is a function 
Javascript :: var relnojudul = 0; 
Javascript :: remove or replacing element array in javascript 
Javascript :: react-template-helper 
Javascript :: Trouble setting up sample table. “Could not find matching row model for rowModelType clientSide” 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =