The document provides an overview of key JavaScript concepts including variables, data types, operators, control flow, functions, objects, and arrays. It explains that JavaScript is used for both client-side scripting in web browsers and server-side scripting with Node.js. Key topics covered include primitive data types, operators, if/else and switch statements, loops, functions, objects, methods, and arrays. The document also discusses JavaScript fundamentals like variables, scoping, and hoisting as well as more advanced topics like recursion, symbols, and memory management.
Slides from talk given at Ithaca Web Group and GORGES on CoffeeScript.
The focus is on explaining to people who haven't tried it yet that it's more than syntactic sugar. There are several real life code examples but they were explained verbally so they may not be super helpful if you don't know CoffeeScript yet.
It's an overview, not a tutorial.
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017 Codemotion
Dopo 20 anni Java inizia a sentire il peso degli anni e la sua sintassi non evolve come vorremmo, ma la JVM resta sempre un ambiente affidabile ed è già in produzione presso moltissime aziende. Negli ultimi anni sono usciti molti linguaggi basati sulla JVM, ma non tutti hanno avuto il successo sperato. Kotlin ha conquistato Android e, ora, grazie a una sintassi intuitiva e grandi aziende che lo supportano potrebbe essere molto utilizzato anche nelle applicazioni web. Durante il talk vedremo le basi del linguaggio e come sviluppare una applicazione web pronta ad andare in produzione.
Slides from talk given at Ithaca Web Group and GORGES on CoffeeScript.
The focus is on explaining to people who haven't tried it yet that it's more than syntactic sugar. There are several real life code examples but they were explained verbally so they may not be super helpful if you don't know CoffeeScript yet.
It's an overview, not a tutorial.
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017 Codemotion
Dopo 20 anni Java inizia a sentire il peso degli anni e la sua sintassi non evolve come vorremmo, ma la JVM resta sempre un ambiente affidabile ed è già in produzione presso moltissime aziende. Negli ultimi anni sono usciti molti linguaggi basati sulla JVM, ma non tutti hanno avuto il successo sperato. Kotlin ha conquistato Android e, ora, grazie a una sintassi intuitiva e grandi aziende che lo supportano potrebbe essere molto utilizzato anche nelle applicazioni web. Durante il talk vedremo le basi del linguaggio e come sviluppare una applicazione web pronta ad andare in produzione.
Esoft Metro Campus - Diploma in Web Engineering - (Module V) Programming with JavaScript
(Template - Virtusa Corporate)
Contents:
Introduction to JavaScript
What JavaScript Can Do?
Script tag in HTML
Noscript tag in HTML
Your First JavaScript Program
JavaScript Placement in HTML File
JavaScript Syntax
JavaScript Data Types
JavaScript Variables
JavaScript Identifiers
Arithmetic Operators
String Concatenation Operators
Assignment Operators
Comparison Operators
Logical Operators
Bitwise Operators
If Statement
If… Else Statement
If… Else if… Else Statement
Switch Statement
The ? Operator
While Loop
Do While Loop
For Loop
For…in Loop
break Statement
continue Statement
Arrays
Functions
JavaScript Objects
JavaScript Scope
Strings
Regular Expressions
JavaScript Numbers
Math Object
Date and Time
JavaScript Events
Dialog Boxes
Error Handling in JavaScript
JavaScript Forms Validation
JavaScript HTML DOM
JavaScript BOM
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesStephen Chin
JavaFX is more than a language. It is also a platform for building immersive applications with graphics, animation, and rich media. In this session, you will see how you can leverage JavaFX from a host of different JVM languages, including Java, JRuby, Groovy, Scala, and Clojure.
Testing most things in JavaScript - LeedsJS 31/05/2017Colin Oakley
Testing is important - it can improve the quality of your code and give you the reassurance to refactor without fear of destroying your application.
My talk will cover different types of automated testing in javascript (unit, integration, acceptance) and some regression as well tools to help standardise code (like js lint).
I'll also talk about automated build tools like jenkins and travis ci.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
Game Design and Development Workshop Day 1Troy Miles
This course teaches you how to build awesome video games using Cocos2Dx. Cocos2Dx is a feature packed, free game development engine. It is cross platform, high performance, and supports three languages: C++, Lua and JavaScript. With it, you can write games for iOS, Android, Windows, Mac, and the Web. It is nothing short of amazing and this course teaches you how to use it. We will program Cocos2Dx in JavaScript, but this is not a programming class. If you don't know how to write code in JavaScript or some other curly brace language, this is not the course for you. For those whose JavaScript is rusty, we will do quick language overview. Don't let the JavaScript part fool you. Cocos2Dx is built from highly optimized C++ and OpenGL, JavaScript is used for game logic, not graphics. Our games will run at a super fast, 60 frames a second.
A look at the future of JVM languages including Kotlin, Scala, Groovy, and latest Java.
Which language to use ? what are the benefits of higher level abstractions ? and what are the benefits of programming on the JVM ?
Esoft Metro Campus - Diploma in Web Engineering - (Module V) Programming with JavaScript
(Template - Virtusa Corporate)
Contents:
Introduction to JavaScript
What JavaScript Can Do?
Script tag in HTML
Noscript tag in HTML
Your First JavaScript Program
JavaScript Placement in HTML File
JavaScript Syntax
JavaScript Data Types
JavaScript Variables
JavaScript Identifiers
Arithmetic Operators
String Concatenation Operators
Assignment Operators
Comparison Operators
Logical Operators
Bitwise Operators
If Statement
If… Else Statement
If… Else if… Else Statement
Switch Statement
The ? Operator
While Loop
Do While Loop
For Loop
For…in Loop
break Statement
continue Statement
Arrays
Functions
JavaScript Objects
JavaScript Scope
Strings
Regular Expressions
JavaScript Numbers
Math Object
Date and Time
JavaScript Events
Dialog Boxes
Error Handling in JavaScript
JavaScript Forms Validation
JavaScript HTML DOM
JavaScript BOM
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesStephen Chin
JavaFX is more than a language. It is also a platform for building immersive applications with graphics, animation, and rich media. In this session, you will see how you can leverage JavaFX from a host of different JVM languages, including Java, JRuby, Groovy, Scala, and Clojure.
Testing most things in JavaScript - LeedsJS 31/05/2017Colin Oakley
Testing is important - it can improve the quality of your code and give you the reassurance to refactor without fear of destroying your application.
My talk will cover different types of automated testing in javascript (unit, integration, acceptance) and some regression as well tools to help standardise code (like js lint).
I'll also talk about automated build tools like jenkins and travis ci.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
Game Design and Development Workshop Day 1Troy Miles
This course teaches you how to build awesome video games using Cocos2Dx. Cocos2Dx is a feature packed, free game development engine. It is cross platform, high performance, and supports three languages: C++, Lua and JavaScript. With it, you can write games for iOS, Android, Windows, Mac, and the Web. It is nothing short of amazing and this course teaches you how to use it. We will program Cocos2Dx in JavaScript, but this is not a programming class. If you don't know how to write code in JavaScript or some other curly brace language, this is not the course for you. For those whose JavaScript is rusty, we will do quick language overview. Don't let the JavaScript part fool you. Cocos2Dx is built from highly optimized C++ and OpenGL, JavaScript is used for game logic, not graphics. Our games will run at a super fast, 60 frames a second.
A look at the future of JVM languages including Kotlin, Scala, Groovy, and latest Java.
Which language to use ? what are the benefits of higher level abstractions ? and what are the benefits of programming on the JVM ?
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
10. Babel Coder
VARIABLES
• A variable is a named value in your program.
• Whenever you use the name in the program, it’s replaced with the value.
var age
The var keyword tells the computer to
take the next word in the statement and
turn it into a variable.
Variable
name
age = 12
The assignment operator
var age = 12
Declare a
variable
Assign a
value
11. Babel Coder
VARIABLE NAMES
var thisIsMyBook;
var $whatMyName;
var _withUnderscore;
var StartWithCapital;
var 123;
var 456abc;
var &special;
var separate by space;
var if
Valid variables
Invalid variables
DYNAMIC TYPING
Variables in JavaScript are not
directly associated with any
particular value type, and any
variable can be assigned (and re-
assigned) values of all types.
var foo = 42 // foo is now a Number
var foo = 'bar' // foo is now String
var foo = true // foo is Now Boolean
12. Babel Coder
DATA TYPES
Primitive
• Boolean
• Null
• Unde
fi
ned
• Number
• String
• Symbol
Object
• Array
• TypedArray
• Dates
• Map
• Set
• WeakMap
• WeakSet
typeof(<VARIABLE>)
Check data type of this variable
15. Babel Coder
OPERATORS
8 == “8”
8 === “8”
Strict Equality Operator
var num = 10
num = num + 10
num += 10
Shorthand
2 + 3 // Addition
3 * 4 // Multiply
5 / 2 // Divide
7 % 2 // Remainder
16. Babel Coder
STRING
Template String
Code Output
n New line
t Tab
Backslash
’ Single quote
” Double quote
var myStr1 = 'Hello World'
var myStr2 = "Hello World"
var myStr3 = "HellonWorld"
var myStr4 = `
Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.
`
var myStr5 = `${myStr1} Krub`
17. Babel Coder
STRING
var name = ‘BABELcoDER’
name B A B E L c o D E R
[0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
name.length
name[3]
name.endsWith(‘ER’)
name.startsWith(‘BABEL’)
name.includes(‘oDE’)
name.indexOf(‘L’)
18. Babel Coder
STRING
B A B E L c o D E R
[0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
B A B E L C O D E R
b a b e l c o d e r
name.toUpperCase()
name.toLowerCase()
19. Babel Coder
STRING
B A B E L C O D E R
B A B
B A B E L B A B E R
name.replace(‘COD’, ‘BAB’)
21. Babel Coder
SYMBOL
Every symbol value returned from Symbol() is unique. A
symbol value may be used as an identi
fi
er for object
properties; this is the data type's only purpose.
const str1 = 'Hello'
const str2 = 'Hello'
const sym1 = Symbol('hello')
const sym2 = Symbol('hello')
console.log(str1 === str2) // true
console.log(sym1 === sym2) // false
22. Babel Coder
PRINTING
var msg = 'Hello'
console.log(msg) // Hello
console.log('Hello') // Hello
console.log(msg, 'World') // Hello World
23. Babel Coder
IF-ELSE STATEMENT
num > 0.5
Yes No
Y N
var num = Math.random()
if (num > 0.5) {
console.log('Yes')
} else {
console.log('No')
}
24. Babel Coder
COMPARISON OPERATORS
Operator Name Example Evaluates to
> Greather than 15 > 3 true
>= Greather than or equal to 12 >= 12 true
< Less than 7 < 3 true
<= Less than or equal to 3 <= 5 false
== equal to 3 == 5 false
!= not equal to 3 != 5 true
=== strictly equal to 3 === “3” true
!== not strictly equal to 3 !== “3” true
25. Babel Coder
IF-ELSE-IF STATEMENT
score >= 80
Grade A
Y N
score >= 70
Grade B
Y N
score >= 60
Grade C
Y N
score >= 50
Grade D
Y N
Grade F
var score = 50
var grade
if (score >= 80) {
grade = 'A'
} else if (score >= 70) {
grade = 'B'
} else if (score >= 60) {
grade = 'C'
} else if (score >= 50) {
grade = 'D'
} else {
grade = 'F'
}
26. Babel Coder
SWITCH STATEMENT
Default Case
switch(new Date().getDay()) {
case 0:
day = 'Sunday'
break
case 1:
day = 'Monday'
break
case 2:
day = 'Tuesday'
break
case 3:
day = 'Wednesday'
break
case 4:
day = 'Thursday'
break
case 5:
day = 'Friday'
break
case 6:
day = 'Saturday'
break
}
var text
switch (new Date().getDay()) {
case 4:
case 5:
text = 'Soon it is Weekend'
break
case 0:
case 6:
text = 'It is Weekend'
break
default:
text = 'Looking forward to the Weekend'
}
27. Babel Coder
FOR LOOP
var sum = 0
for (var i = 1; i <= 3; i++) {
sum += i
}
Initial
Condition
Post Condition
Loop i sum
1 1 0
2 2 1
3 3 3
6
i <= 3
sum += i
Y N
var sum = 0
sum += 1
sum += 2
sum += 3
28. Babel Coder
WHILE LOOP
var sum = 0
var i = 1
while (i <= 3) {
sum += i
i++
}
Initial
Condition
Post Condition
var sum = 0
sum += 1
sum += 2
sum += 3
30. Babel Coder
EXPRESSIONS VS STATEMENTS
• Expressions only contain identifiers, literals and operators, where operators include
arithmetic and boolean operators, the function call operator () the subscription
operator [] and similar, and can be reduced to some kind of "value", which can be any
JavaScript object.
• Statements, on the other hand, are everything that can make up a line (or several lines) of
JavaScript code. Note that expressions are statements as well.
Expressions Statements
if (x % 2 === 0) {
console.log('Even')
}
3 + 5
"Hello".substr(1, 2)
31. Babel Coder
FUNCTIONS
var sum = 0
for (var i = 1; i <= 3; i++) {
sum += i
}
console.log(sum)
sum = 0
for (var i = 10; i <= 20; i++) {
sum += i
}
console.log(sum)
sum = 0
for (var i = 9; i <= 100; i++) {
sum += i
}
console.log(sum)
sum of 1 to 3
sum of 10 to 20
sum of 9 to 100
“Sum” function
32. Babel Coder
FUNCTIONS
function () {
}
keyword function
Parentheses
Code block between curly b
for the function body
function sayHello() {
console.log(‘Hello')
}
sayHello() // Hello
var sayHello = function() {
console.log(‘Hello')
}
sayHello() // Hello
33. Babel Coder
FUNCTIONS
function sum(start, end) {
var sum = 0
for(var i = start; i <= end; i++) {
sum += i
}
return sum
}
var result = sum(1, 3)
console.log(result)
result = sum(10, 20)
console.log(result)
console.log(sum(9, 100))
sum of start to end
returns sum
Parameters
Arguments
sum(1, 3)
function sum(start, end)
Parameters
Arguments
34. Babel Coder
ARROW FUNCTION
function foo(a) {
return a + 1
}
const foo = (a) => {
return a + 1
}
const foo = a => {
return a + 1
}
const foo = a => a + 1
const foo = a => let b = a + 1
35. Babel Coder
RECURSION
5! = 5 x 4 x 3 x 2 x 1
4! = 4 x 3 x 2 x 1
3! = 3 x 2 x 1
2! = 2 x 1
1! = 1
0! = 1
function factorial(n) {
var result = 1
for(var i = 1; i <= n; i++) {
result *= i
}
return result
}
console.log(factorial(5))
36. Babel Coder
RECURSION
fac(5)
5 fac(4)
4 fac(3)
3 fac(2)
2 fac(1)
1
X
X
X
X
2
6
24
120
120
function factorial(n) {
if (n <= 1) return 1
return n * factorial(n - 1)
}
37. Babel Coder
SCOPING
var result = 0
function plus(a, b) {
result = a + b
return result
}
function sum(start, end) {
for(var i = start; i <= end; i++) {
result += i
}
return result
}
plus(100, 200)
console.log(sum(1, 10)) // 355
function plus(a, b) {
var result = a + b
return result
}
function sum(start, end) {
var result = 0
for(var i = start; i <= end; i++) {
result += i
}
return result
}
plus(100, 200)
console.log(sum(1, 10)) // 55
38. Babel Coder
HOISTING
var a = 1
function foo() {
var b = 2
if(b > a) {
var c = 3
}
console.log(c) // 3
}
foo()
var a = 1
function foo() {
var b
var c
b = 2
if(b > a) {
c = 3
}
console.log(c) // 3
}
foo()
39. Babel Coder
LET AND CONST
function foo() {
let x = 1
x = 2
}
foo()
function foo() {
const x = 1
x = 2
}
foo()
45. Babel Coder
ARRAYS
var dayOfWeek = 1
var day
switch(dayOfWeek) {
case 1:
day = 'Sunday'
break
case 2:
day = 'Monday'
break
case 3:
day = 'Tuesday'
break
case 4:
day = 'Wednesday'
break
case 5:
day = 'Thursday'
break
case 6:
day = 'Friday'
break
case 7:
day = 'Saturday'
break
}
var dayOfWeek = 1
var daysOfWeek = {
1: 'Sunday',
2: 'Monday',
3: 'Tuesday',
4: 'Wednesday',
5: 'Thursday',
6: 'Friday',
7: 'Saturday'
}
var day = daysOfWeek[dayOfWeek]
var dayOfWeek = 1
var daysOfWeek = [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'
]
var day = daysOfWeek[dayOfWeek - 1]
51. Babel Coder
DESTRUCTURING
let person = {
age: 24,
gender: 'male',
name: {
fi
rstName: '
fi
rstName',
lastName: 'lastName'
}
}
let age = person.age
let gender = person.gender
let name = person.name
let
fi
rstName = name.
fi
rstName
let lastName = name.lastName
let { age, gender, name } = person
let {
fi
rstName, lastName } = name
let { age, gender, name: {
fi
rstName, lastName } } = person
71. EXAMPLE 1
Fetch content from URL: https://jsonplaceholder.typicode.com/todos
import axios from 'axios'
async function fetchPosts() {
const res =await axios.get(URL)
console.log(res.data)
console.log(res.status) // 200
}
fetchPosts()
HTTP GET HTTP POST
import axios from 'axios'
async function createPost() {
const res =await axios.post(
URL, { title: 'Test', completed: true })
console.log(res.status) // 201
}
createPost()
72. ES MODULE - NAMED EXPORTS
export const DEFAULT_COLOR = 'white'
export function walk() {
console.log('Walking...')
}
{
DEFAULT_COLOR: 'white',
walk() {
console.log('Walking...')
}
}
dog.js
main.js
syntax: 1
import * as lib from './dog.js'
lib.DEFAULT_COLOR // white
lib.walk() // Walking...
main.js
syntax: 2
import { DEFAULT_COLOR, walk } from './dog.js'
73. ES MODULE - DEFAULT EXPORT
circle.js
main.js
syntax
export default class Circle {
area() {
}
}
import Circle from './circle.js'
74. ES MODULE - BOTH
circle.js
export const PI = 3.14
export default class Circle {
area() {
}
}
main.js
syntax
import Circle, { PI } from './circle.js'