var variable = 100;
function changeValue()
{
variable = 200;
}
changeValue();
document.getElementById('output').innerHTML = "New Value: " + variable;
New Value: 200
Refresh Complete Tutorial with CodeMore JavaScript Tutorials
Get First Character of String with JavaScript
Get Last Element Of Array Without Removing It
Remove Last Element From Array JavaScript
Remove First Element From Array in JavaScript
Tic Tac Toe Game in JavaScript
Remove Class from HTML Tag OnClick JavaScript
JavaScript Select li Tag By Index
Display JavaScript Variable In HTML
Insert HTML Code anywhere With JavaScript
JavaScript Date Difference in Days
JavaScript Hide Button After Click
Simple Click and Hold Effect Using JavaScript
Remove Class From All Elements in JavaScript
JavaScript Select All HTML Elements Whose ID Start With Same String
Count Checked Checkboxes of Specific Form with JavaScript
Enable and Disable Button using JavaScript
Add Class to HTML Tag On Click using JavaScript
Change Class of HTML Tag Using JavaScript
Get All Options In Select Tag using JavaScript
Replace a Word from everywhere in a String using JavaScript
Execute a Function on Hover Using JavaScript