---
title: "Discussion on \"Passing default values to an object parameter\" | Hashnode"
description: "Discussion on \"Passing default values to an object parameter\". Passing default values to function parameters can avoid nasty 'undefined' surprises and give us better control over our code. Open parenthesis, write a variable name, add equals, write the initial value you want, and close parenthesis. Easy peasy. No..."
url: "https://hashnode.com/posts/passing-default-values-to-an-object-parameter/6128eec79da1766342ad664c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Passing default values to an object parameter](https://dmartorell.hashnode.dev/passing-default-values-to-an-object-parameter?utm_source=hashnode&utm_medium=feed)

Passing default values to function parameters can avoid nasty 'undefined' surprises and give us better control over our code. Open parenthesis, write a variable name, add equals, write the initial value you want, and close parenthesis. Easy peasy. No...

Aug 27, 2021 · 1 min read · dmartorell.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Daniel Martorell](https://hashnode.com/@dmartorell)

@dmartorell · Illes Balears

  
[View profile](https://hashnode.com/@dmartorell)

Software Developer

I am a developer from Spain.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
