---
title: "Discussion on \"Swapping Values Using Arithmetic Operations in JavaScript\" | Hashnode"
description: "Discussion on \"Swapping Values Using Arithmetic Operations in JavaScript\". Swapping Values Using Arithmetic Operations in JavaScript.\n\n// Get the sum\na = a + b; // a = 12\n// Reasign b with the value of a\nb = a - b;  // b = 12 - 7"
url: "https://hashnode.com/posts/swapping-values-using-arithmetic-operations-in-javascript/62a04d063e84266b4609474b"
---

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

Discussion

# [Swapping Values Using Arithmetic Operations in JavaScript](https://tiberiusmairura.hashnode.dev/swapping-values-using-arithmetic-operations-in-javascript?utm_source=hashnode&utm_medium=feed)

Swapping Values Using Arithmetic Operations in JavaScript. // Get the sum a = a + b; // a = 12 // Reasign b with the value of a b = a - b; // b = 12 - 7

Jun 8, 2022 · 2 min read · tiberiusmairura.hashnode.dev  
Read the article

-   [#beginners](https://hashnode.com/tag/beginners)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#swap-values](https://hashnode.com/tag/swap-values)
-   [#swap-values-with-arithmetic-operations](https://hashnode.com/tag/swap-values-with-arithmetic-operations)

## Written by

[Tiberius Mairura](https://hashnode.com/@hermitex)

@hermitex · Nairobi, Kenya

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

Create, curate, teach.

Full-stack developer with experience using React, Spring Boot, MySQL, PostgreSQL and more. I like solving problems and building things people will love to use.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
