Blog na temat programowania. Wszystkie materia艂y do nauki znajdziesz pod tagiem "materia艂y". Autor - Kamil Naja
艣roda, 28 sierpnia 2019
sobota, 17 sierpnia 2019
czwartek, 15 sierpnia 2019
Programming exercise #11 - Clone object, without copying reference
// So, you have object like this
const obj = {
firstName: "John",
lastName: "Doe"
}
//Please create second object, that have firstName and lastName
// properties from first object.
// properties from first object.
console.log(myClonedObject) // {firstName: "John", lastName: "Doe"}
// Your goal is copy only properties, not the reference to object.
// so when we change first object like this :
// so when we change first object like this :
obj.firstName = "Mary"
// output on cloned object should look the same.
console.log(myClonedObject) // {firstName: "John", lastName: "Doe"}
// Please post your answer as codepen, jsbin or link into your github gist.
pi膮tek, 9 sierpnia 2019
Programming exercise #10 - emit 6 values in interval, remember about reseting
// Interesting exercise, that I have found in StackOverflow
// After click in button, return values from 0 to 6 with interval 1000 ms.
// After every click in button, again start emitting from 0 to 6
// I suggest you, to use rxjs
Programming exercise #9 - one array from two
// Simple exercise for today
// Your goal is to merge two arrays into one.
const arr1 = ["a", "b", "c"];
const arr2 = ["e", "f", "g"];
// expected result ["a", "b", "c", "e", "f", "g"]
Subskrybuj:
Posty (Atom)