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
max_execution_time = 0 | |
memory_limit 128M | |
file_uploads = On | |
post_max_size = 256M | |
upload_max_filesize = 256M | |
time_limit = 180 | |
max_input_vars = 5000 | |
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
// PRIMITIVE | |
// String | |
const name = 'John Doe'; | |
// Number | |
const age = 45; | |
// Boolean | |
const hasKids = true; |
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
let val; | |
// Number to string | |
val = String(98796292); | |
// Boolean to string | |
val = String(true); | |
// Date to string | |
val = String( new Date()); |
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
const num1 = 10; | |
const num2 = 50; | |
let val; | |
//Simple math with numbers | |
val = num1 + num2; | |
val = num1 * num2; | |
val = num1 - num2; | |
val = num1 / num2; | |
val = num1 % num2; |
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
const firstName = 'William'; | |
const lastName = 'Johnson'; | |
const age = 22; | |
const str = 'testing'; | |
const tags = 'web devalopement, design'; | |
let val; | |
// val = firstName + lastName; |
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
const name = 'John'; | |
const age = 31; | |
const job = 'Web Developer'; | |
const city = 'Miami'; | |
let html; | |
// Without template strings (es5) | |
html = '<ul><li>Name: '+ name +'</li><li>Age: ' + age + '</li><li>City: '+ city +'</li></ul>'; | |
html = '<ul>' + |
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
// Create some arrays | |
const numbers = [43,55,64,45,3213,445,0.2]; | |
const numbers2 = new Array(222,3323,212,2121,321,2555); | |
const fruit = ['Apple', 'Banana', 'Orange', 'Pear']; | |
const mixed = [22,'Hello',true,undefined,null,{a:1, b:1},new Date]; | |
let val; | |
// Get array length | |
val = numbers.length; |
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
const person = { | |
firstName: 'Steve', | |
lastName: 'Smith', | |
age: 30, | |
email: 'steve@aol.com', | |
hobbies: ['music', 'sports'], | |
address: { | |
city: 'Miami', | |
state: 'FL' | |
}, |
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
let val; | |
const today = new Date(); | |
let birthday = new Date('1988-10-21 11:25:00'); | |
// let birthday = new Date('1988/10/21'); | |
val = birthday; | |
val = today.getMonth(); | |
val = today.getDate(); |
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
document.getElementById('button').addEventListener('click', loadData); | |
function loadData(){ | |
// Create an XHR Object | |
const xhr = new XMLHttpRequest(); | |
// OPEN | |
xhr.open('GET', 'data.txt', true); |
OlderNewer