---
title: "Discussion on \"🚨 Memahami eval di JavaScript, Bahayanya, dan Cara Mengatasinya di Vite + React + TS + Hono\" | Hashnode"
description: "Discussion on \"🚨 Memahami eval di JavaScript, Bahayanya, dan Cara Mengatasinya di Vite + React + TS + Hono\". 1. Apa itu eval?\neval adalah fungsi bawaan JavaScript yang bisa mengeksekusi string sebagai kode JavaScript.Contoh:\nconst code = \"2 + 2\";\nconsole.log(eval(code)); // 4\n\nSekilas terlihat praktis, tapi sangat berisiko. eval akan membaca string apa adan..."
url: "https://hashnode.com/posts/memahami-eval-di-javascript-bahayanya-dan-cara-mengatasinya-di-vite-react-ts-hono/68f2fb394a9ec7f5b6fcd1d5"
---

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

Discussion

# [🚨 Memahami eval di JavaScript, Bahayanya, dan Cara Mengatasinya di Vite + React + TS + Hono](https://tech.finlup.id/memahami-eval-di-javascript-bahayanya-dan-cara-mengatasinya-di-vite-react-ts-hono?utm_source=hashnode&utm_medium=feed)

1\. Apa itu eval? eval adalah fungsi bawaan JavaScript yang bisa mengeksekusi string sebagai kode JavaScript.Contoh: const code = "2 + 2"; console.log(eval(code)); // 4 Sekilas terlihat praktis, tapi sangat berisiko. eval akan membaca string apa adan...

Oct 18, 2025 · 3 min read · tech.finlup.id  
Read the article

-   [#eval](https://hashnode.com/tag/eval)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#hono](https://hashnode.com/tag/hono)
-   [#typescript](https://hashnode.com/tag/typescript)

## Written by

[Ariska Hidayat](https://hashnode.com/@ariska138)

@ariska138 · Sragen, Indonesia

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

We Make Technology Easy and Fun

I am an enthusiastic researcher and developer with a passion for using technology to innovate in business and education.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
