This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-controller="authorController" > | |
{{author.name}} is {{author.age}} old | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var add = function Add(num1, num2) | |
{ | |
var result = num1 + num2; | |
return result; | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var add = function Add(num1, num2) | |
{ | |
var result = num1 + num2; | |
return result; | |
}; | |
var s = add(34, 67); | |
console.log(s); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sub = function (num1, num2) | |
{ | |
var result = num1 - num2; | |
return result; | |
}; | |
var r = sub(5, 9); | |
console.log(r); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s = sub(34, 67); | |
console.log(s); | |
var sub = function (num1, num2) | |
{ | |
var result = num1 - num2; | |
return result; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Factorial(n) | |
{ | |
if (n <= 1) { | |
return 1; | |
} | |
return n * Factorial(n - 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = Add(9, 8); | |
console.log(result); | |
function Add(num1, num2) | |
{ | |
return num1 + num2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add(num1, num2) | |
{ | |
return num1 + num2; | |
} | |
var result = Add(1, 2); | |
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Foo() | |
{ | |
// function body | |
} | |
var result = Foo(); | |
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Foo() | |
{ | |
// function body | |
return; | |
} | |
var result = Foo(); | |
console.log(result); |
OlderNewer