A Pen by Antônio Paulo on CodePen.
Last active
February 21, 2018 14:03
-
-
Save paulinhoneto/e187a3e69e054e243de9308fb7d3454e to your computer and use it in GitHub Desktop.
Basics of JavaScript & ES6 Syntax
This file contains hidden or 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
| // 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