Skip to content

teamagilelaura/JavaScriptForWeb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScriptForWeb

Lesson 1

https://github.com/henningmu/js-workshop/blob/master/exercises/Session-01.pdf

  1. What's the value of result? const badlyNamedFunction = (a, b) => a + b

const result = badlyNamedFunction(3, 5)

--> 8

  1. What's the value of result? const badlyNamedFunction = (a, b = 3) => a + b

const result = badlyNamedFunction(4)

--> 7 (4 für a und b ist 3) Fall-back, wenn badlyNamedFunction(4, 4) --> 8

  1. What will be logged? const data = { name: 'Henning', role: 'Engineer' }

console.log(${data.name}'s role is ${data.role})

--> Henning's role is Engineer

  1. What will be logged? const person = { name: 'Henning', age: 28 } const person2 = person person2.name = 'Nina'

console.log(Hello, ${person.name})

--> Hello Nina

  1. What do we need to change in exercise 6 to log Hello, Henning?

--> const person = { name: 'Henning', age: 28 } const person2 = {...person} person2.name = 'Nina'

console.log(Hello, ${person.name})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published