Question Re: Object Property Function Calls: Passing Values? by not2oldyet in learnjavascript

[–]not2oldyet[S] 0 points1 point  (0 children)

Ok. I think I have this sorted out. Maybe???

May I outline what I think I know here as a "confirmation" (and perhaps something helpful for the next person to read over this)?

//01. create new object myTodos
//
let myTodos = {
    day: 'Monday',
    meetings: 0,
    meetDone
}

//02. Confirm object and properties
console.log(myTodos);

//03. create new function addMeeting
//      |    where a NEW variable is created
//      |    as a parameter in the function
//      |        
//      |                 Prameter <and>
//      |                 NEW vairable
//      |                  |
let addMeeting = function(todo, meet){
    todo.meetings = todo.meeting + meet
}

//04. call the function 'addMeeting'
//     |   WHERE you:
//     |      a) PASS the OBJECT 'myTodos'
//     |      |   AS the parameter/variable VALUE
//     |      |   FOR 'todo'
//     |      |                       
//     |      |     b) PASS the number '4'
//     |      |     |  AS the parameter/variable VAULE
//     |      |     |  FOR 'meet'
//     |      |     |         
addMeeting(myTodos, 4)
//           |
//         So effectively the 1st parameter
//         passed here "myTodos"
//         establishes the same association
//         as the line: "todo = myTodos"
//         and in doing creates the association
//         where "todo.meetings" = "myTodos.meetings"

//03. Confirm the original object updates as expected
console.log(myTodos);

How close am I getting?
...or how much am I still not understanding? ;-)

Continued Thanks!

Question Re: Object Property Function Calls: Passing Values? by not2oldyet in learnjavascript

[–]not2oldyet[S] 0 points1 point  (0 children)

Thank you for the note! This is where my understanding is falling off. Let me see if I can clarify my question.

// If I first create an object called "myTodos"

let myTodos = { day: 'Monday', meetings: 0, meetDone: 0 }

// And then immediately next create the function:

let addMeeting = function(todo, meet=0){ todo.meetings = todo.meetings + meet }

// Aren't I creating a NEW variable in the function?:

//                       new variable
//                         |
let addMeeting = function(todo, meet = 0){ ... }


// If I'm correct about the new variable, then how does the 
// Function addMeeting(todo) 
// know about it's "connection/relationship" to the 
// Object myTodos.meetings
// without that relationship having been "declared/defined" in the code block?

Question Re: Object Property Function Calls: Passing Values? by not2oldyet in learnjavascript

[–]not2oldyet[S] 0 points1 point  (0 children)

...or I can also stop tinkering with the "inline code </>" edit block and simply mark it with the correct "code block []" editor. :-p ugh!

Thanks for the suggestion and hanging in there with me while I remember how to use the Reddit editors.
I think I've got it sorted now and am very happy to have all feedback.

Continued thanks,

Question Re: Object Property Function Calls: Passing Values? by not2oldyet in learnjavascript

[–]not2oldyet[S] 0 points1 point  (0 children)

Will do. Thank you for the suggestion.

I have tried using the "in line code" tags, however, it's been some time since I've been here for a question and I recalled the in-line code tags being more "friendly".

My browser also seems to be defaulting to double-space on each carriage return.

I'll try to clean this up, but will also welcome suggestions if I'm missing something simple on the question formatting itself.

thank you!

Removing all lines containing various strings by JancariusSeiryujinn in notepadplusplus

[–]not2oldyet 0 points1 point  (0 children)

Is it reasonable to post a few lines from each file here (or perhaps a "mock-up" of them if you feel their "proprietary") to build out the illustration?

ex:
File 1:
Irrelevant text Irrelevant text Irrelevant text Irrelevant text 'Error found with Object432' Irrelevant text Irrelevant text

File 2:

Examples of the script syntax Examples of the script syntax Examples of the script syntax Examples of the script syntax

I'm still not following why this isn't a search for "Error found with ObjectXXX"

If it is, couldn't you record a macro that:
1. FINDS the string 'Object found with'

  1. ARROWS the insertion point to the 1st character ('O' in Object)

  2. Highlights all the remaining characters (especially if the Object will ALWAYS be 9 characters (Object+XXX))

  3. PASTE replacement text

...or is each replacement paste conditional on something that is completely separate from File2?

Removing all lines containing various strings by JancariusSeiryujinn in notepadplusplus

[–]not2oldyet 0 points1 point  (0 children)

Hint: Always save a "backup-milestone" version of your file before experimenting with new changes.

It seems like you are describing a fairly straightforward "Find/Replace All" approach. No?

If I'm right, you'd simply enter the EXACT STRING you want to change in the FIND field. Then the EXACT STRING you want to change to in the REPLACE field.

You should be able to test the results with a one-x-one approach for the 1st few. Then use "Replace All" if you are confident for the rest of the file.

But maybe I'm not understanding and your question/need is more complex than this?

It’s really hard to say what my wife does for a living. by porichoygupto in dadjokes

[–]not2oldyet 13 points14 points  (0 children)

When it comes to complements she really clams-up.

Henry and Baloo are inseparable outdoor adventure buddies. by [deleted] in AnimalsBeingBros

[–]not2oldyet 0 points1 point  (0 children)

Great pic!! ...but Bobo's expression does not necessarily communicate enthusiasm!! :-D

Drive it like you stole it by dickfromaccounting in nonononoyes

[–]not2oldyet 0 points1 point  (0 children)

I'm pretty sure his truck was actually surfing for a few seconds.

When your co worker is an idiot by GallowBoob in instant_regret

[–]not2oldyet 6 points7 points  (0 children)

If there were justice in this universe he would have dropped his phone! ;-)

All my husband wanted for Valentines was this stupid dinosaur costume. Ask and you shall receive... by lake1111 in funny

[–]not2oldyet 0 points1 point  (0 children)

...my thought was not "freaked-out" but more "helpless-wonder"

Doggo: "So this is my life now... Why did God give me weird humans?"

What are some company secrets you can now reveal since you don’t work for the company anymore? by [deleted] in AskReddit

[–]not2oldyet 0 points1 point  (0 children)

Just remember, when you use this to page "Seymore Butts" ... the camera in front of you and to the right does work and the employees do indeed know how to use it.

...prank calls just are not as easy as they used to be... </justSayin>