Skip to content

Instantly share code, notes, and snippets.

@paulinhoneto
Last active February 21, 2018 14:03
Show Gist options
  • Save paulinhoneto/e187a3e69e054e243de9308fb7d3454e to your computer and use it in GitHub Desktop.
Save paulinhoneto/e187a3e69e054e243de9308fb7d3454e to your computer and use it in GitHub Desktop.
Basics of JavaScript & ES6 Syntax
// Variables and Types
var name = "Paulinho Neto";
var age = 42;
var height = 1.74;
var weight = 65.0;
var maritalStatus = true;
var children = 3;
var country = "Brazil"
var formation = "Computer Science";
var university = "Universidade Paulista - 2014-2018";
var course = "Basic of javacript & ES6 syntax";
var favoriteLanguages = ["javascript", "c", "cplus", "python", "ruby", "php"];
var me = {
"name" : name,
"age" : age,
"height" : height,
"weight" : weight,
"maritalStatus" : maritalStatus,
"children" : children
};
/*Scopo of a variable
let a = 1;
console.log(a);
a = 2;
console.log(a);
const b = 3;
console.log(b);
b = 4;
console.log(b);
*/
// basic function
function sum(n1, n2){
return n1+n2;
}
const SCREAMIT = favoriteLanguages.map(function(language){
return language.toUpperCase();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment