DEV Community

Cover image for Whoa there Bubba!!!!
KingCodingByDee2020
KingCodingByDee2020

Posted on

2 2

Whoa there Bubba!!!!

Davoris Cowell

About Me

Hi! I'm from Georgia. I've been coding for four years now but there's never too much knowledge!

Dublin, GA 31021.

Weeks 2 & 3

Functions & Object Oriented Programming

What we learned these past two weeks have been challenging, but yet very productive. We've been going over objects, arrays, and functions.

Functions are one of the fundamental building blocks in JavaScript. A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. To use a function, you must define it somewhere in the scope from which you wish to call it. Functions can be declared or expressed. The difference between the two id when and where they are invoked. We've also discussed how a function can be called in another function, which is called closures. Closures are the nesting of functions, and grants the inner function full access to all the variables and functions defined inside the outer function.

Object Oriented Programming or OOP is based on the concept of "objects", which can contain data and code: attributes or properties, and code, in the form of methods. Objects can contain related data and code, which represent information about the thing you are trying to model, and functionality or behavior that you want it to have. Object data can be encapsulated in a namespace making it easy to structure and access.

Special thanks to the MDN for helping me understand these definitions more thoroughly!!

Image of Datadog

Master Mobile Monitoring for iOS Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

Get The eBook

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay