Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 502 Bytes

how-do-i-declare-a-variable-without-initializing-it-in-rust.md

File metadata and controls

18 lines (12 loc) · 502 Bytes

How do I declare a variable without initializing it in Rust?

// plain

A variable in Rust can be declared without initializing it. This is done by using the let keyword followed by the variable name.

let x;

This will declare a variable x without initializing it.

  • let: keyword used to declare a variable
  • x: name of the variable

Helpful links

group: rust-variables