---
title: "Discussion on \"ERROR Handling\" | Hashnode"
description: "Discussion on \"ERROR Handling\". assignment solution\n// 1. Type Conversion.// Write a function called convertToNumber that takes a string as an argument and returns the equivalent number. If the string cannot be converted to a number, the function should return the string \"Invalid n..."
url: "https://hashnode.com/posts/error-handling/6591a56920940bfde2935ca9"
---

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

Discussion

# [ERROR Handling](https://fullstackwebdevelopbyafroj.hashnode.dev/error-handling?utm_source=hashnode&utm_medium=feed)

assignment solution // 1. Type Conversion.// Write a function called convertToNumber that takes a string as an argument and returns the equivalent number. If the string cannot be converted to a number, the function should return the string "Invalid n...

Dec 31, 2023 · 5 min read · fullstackwebdevelopbyafroj.hashnode.dev  
Read the article

## Written by

[Afroj Mansoori](https://hashnode.com/@afroj07)

@afroj07

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

write all about to web development and programming

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
