Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: nodejs Q61 answer #2168

Merged
merged 1 commit into from
Sep 5, 2021
Merged

fix: nodejs Q61 answer #2168

merged 1 commit into from
Sep 5, 2021

Conversation

johnnychang25678
Copy link
Contributor

Q61. What will this code log to the console?

// File: person.js
exports.name = "Jane";

// File: index.js
const person = require('./person.js');
console.log(person);

Correct answer should be {name: 'Jane}:

$ cat person.js 
exports.name = "Jane";
$ cat index.js 
const person = require('./person.js');
console.log(person);
$ node index.js 
{ name: 'Jane' }

Copy link
Owner

@Ebazhanov Ebazhanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks @johnnychang25678 for your input! 👍

@Ebazhanov Ebazhanov merged commit fc44834 into Ebazhanov:master Sep 5, 2021
@Ebazhanov
Copy link
Owner

@all-contributors please add @johnnychang25678 for design, code

@allcontributors
Copy link
Contributor

@Ebazhanov

I've put up a pull request to add @johnnychang25678! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants