DEV Community

Cover image for Day 2: Understanding Variables and Data Types in JavaScript

Day 2: Understanding Variables and Data Types in JavaScript

Dipak Ahirav on May 30, 2024

Introduction Welcome to Day 2 of your JavaScript journey! Yesterday, we set up our development environment and wrote our first lines of ...
Collapse
 
jonrandy profile image
Jon Randy πŸŽ–οΈ

You're missing BigInt from the primitive data types.

Collapse
 
dipakahirav profile image
Dipak Ahirav

Thank you so much for your kind words and feedback! πŸ™ I'm thrilled to hear that you found the post helpful. Your support means a lot to me. If you enjoyed this post, please consider subscribing to my YouTube channel devDive with Dipak for more content. Don’t forget to share it with your friends and help spread the word. Your support helps me to continue creating valuable content. Thanks again! 😊

Collapse
 
jonrandy profile image
Jon Randy πŸŽ–οΈ

Nothing says 'I respect my readers' more than what seems to be an automated reply. You might want to reconsider this approach.

Thread Thread
 
dipakahirav profile image
Dipak Ahirav

Hi Jon Randy,

I apologize if my previous response came off as impersonal. I truly appreciate your engagement and pointing out the omission of BigInt from the primitive data types. This kind of constructive feedback is invaluable and helps improve the quality of my posts.

I will make sure to update the post to include BigInt. Thank you for taking the time to read and comment. Your support is important to me, and I’ll strive to be more responsive and personalized in my future interactions.

Collapse
 
neurabot profile image
Neurabot

Dear, your several code lines don't implement. Why ? When a curious comes here, it's for learning purposes. You must not write something which is false or biased. Any line doesn't saddenly match. This can put content worth down.

Collapse
 
dipakahirav profile image
Dipak Ahirav

thanks @heyeasley , Can you suggest me what is wrong in it? That will be helpful.

Collapse
 
neurabot profile image
Neurabot • Edited

Thank. How do I implement all examples written on this page ? When I write them my EDI, it doesn't work, I use Microsoft Visual Basic. Of course, It isn't EDI's hustle.

Thread Thread
 
dipakahirav profile image
Dipak Ahirav • Edited

Thanks for your feedback @heyeasley . I'm glad you're exploring the examples from my blog. Here are some steps to help you implement the JavaScript examples from my post in Microsoft Visual Studio Code:

  1. Install Visual Studio Code:
    If you haven't already, download and install Visual Studio Code from here.

  2. Set Up Your Project:

    • Open Visual Studio Code.
    • Create a new folder for your project.
    • Open the folder in Visual Studio Code by selecting File > Open Folder.
  3. Create an HTML File:

    • Inside your project folder, create a new file and name it index.html.
    • Add the following basic HTML structure to your index.html file:
     <!DOCTYPE html>
     <html lang="en">
     <head>
       <meta charset="UTF-8">
       <meta name="viewport" content="width=device-width, initial-scale=1.0">
       <title>JavaScript Examples</title>
     </head>
     <body>
       <h1>JavaScript Examples</h1>
       <script src="script.js"></script>
     </body>
     </html>
    
  4. Create a JavaScript File:

    • In the same project folder, create another file named script.js.
    • Copy the JavaScript examples from my blog post and paste them into this script.js file.
  5. Run Your Code:

    • Open the index.html file in your browser. You can do this by right-clicking the file in Visual Studio Code and selecting Open with Live Server (if you have the Live Server extension installed) or simply by dragging the index.html file into your browser.
    • Check the console in your browser's developer tools (you can open this by pressing F12 or right-clicking on the page and selecting Inspect, then going to the Console tab) to see the output of your JavaScript code.

Here's an example of what your script.js file might look like with one of the examples from my blog:

// Example of declaring a variable
let greeting = "Hello, World!";
console.log(greeting);

// Example of data types
let number = 42; // Number
let name = "Alice"; // String
let isStudent = true; // Boolean

console.log(number, name, isStudent);
Enter fullscreen mode Exit fullscreen mode

Feel free to let me know if you run into any issues or need further assistance. I'm here to help!

Thread Thread
 
neurabot profile image
Neurabot

OK. Thanks you too much.

Thread Thread
 
dipakahirav profile image
Dipak Ahirav

Your welcome

Collapse
 
neurabot profile image
Neurabot

interesting.

Collapse
 
dipakahirav profile image
Dipak Ahirav

Thank you so much for your kind words and feedback! πŸ™ I'm thrilled to hear that you found the post helpful. Your support means a lot to me. If you enjoyed this post, please consider subscribing to my YouTube channel devDive with Dipak for more content. Don’t forget to share it with your friends and help spread the word. Your support helps me to continue creating valuable content. Thanks again! 😊

Collapse
 
dipakahirav profile image
Dipak Ahirav

Next part -> Day - 3