Create a function that uses .toUpperCase() and .includes() on a string and logs the results.
createUserObject
4 months agoCreate a function createUserObject that returns an object with properties name and age.
factoryFunction
4 months agoCreate a factory function createPerson that takes name and age, and returns an object with those properties.
constructorFunction
4 months agoCreate a constructor function Person with name and age properties. Create a new person and log it.
addProperty
4 months agoCreate an object and then dynamically add a property called 'country' to it and log the object.
checkConstructor
4 months agoCreate a function checkConstructor that logs the constructor of an object created with {}.
functionIsObject
4 months agoCreate a function myFunc and log its typeof and check if it has a name property.
valueVsReference
4 months agoCreate two object variables pointing to the same object. Modify one and log both.
enumerateProperties
4 months agoCreate an object and use for...in to log all its property names.
cloneObject
4 months agoCreate an object and make a shallow clone using spread operator, then log the clone.
destructObject
4 months agoCreate an object with name and age, destructure it, and log both values.
mathObject
4 months agoCreate a function that logs Math.PI and the rounded value of 4.7.
stringMethods
4 months agoCreate a function that uses .toUpperCase() and .includes() on a string and logs the results.
dateObject
4 months agoCreate a function that logs the current year using the Date object.