---
title: "5 Things I Didn’t Know About JavaScript Operators"
url: https://daily.dev/posts/5-things-i-didn-t-know-about-javascript-operators-uvgm9iev1
source_url: https://medium.com/javascript-in-plain-english/5-things-i-didnt-know-about-javascript-operators-44bb1d03c71a
type: article
source: "JavaScript in Plain English"
published: 2020-12-09T08:14:49.407Z
updated: 2021-10-07T14:17:10.317Z
tags: ["javascript"]
reading_time: 9
upvotes: 20
comments: 5
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 5 Things I Didn’t Know About JavaScript Operators

**[JavaScript in Plain English](https://daily.dev/sources/jsPlainEnglish)** · 9 min read · 20 upvotes · 5 comments

## Summary

A single unary operator as a prefix, +x or — x , will convert a string to an integer. A positive unary operators, + , will only transform values into integers. A negative operator, — , will both transform a value into an integer and turn it negative. Two negatives do make a positive, so probably best to just keep to the positive prefix.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/javascript-in-plain-english/5-things-i-didnt-know-about-javascript-operators-44bb1d03c71a>

## Community discussion

Top comments from developers on daily.dev.

**@alfreddagenais** · 1 upvotes

> Some time a bit weird to understand, but very helpful to get information. And other great point we need to read more the documentation 😅😂

**@gloarte94** · 0 upvotes

> Very good information

**@iaros** · 0 upvotes

> Very useful. Thank you!

**@ghost** · 0 upvotes

> Great points, helpful for beginners.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/5-things-i-didn-t-know-about-javascript-operators-uvgm9iev1)
