teleren/devto huggingface dataset:
JAVASCRIPT VARIABLES
Tags: javascript, tutorial
Published: 2019-02-20 04:43:58

---
title: JAVASCRIPT VARIABLES
published: true
description: Variables are a core part of JavaScript, They let you store information
tags: JavaScript, Tutorial
---

This post was originally published on my blog, find original post [here](https://santhoshkumarr0.github.io/posts/javascript-variables/)

Variables are core part of JavaScript like every programming language , They let you store information to be referenced and manipulated .

## What is a variable ?

A variable is simply a place or more like a container that hold information.
We need to  label the information with a descriptive  name, so our program could be understood more clearly by the reader. we can modify, replace or delete the information in a variable by its name.

To create(_define_ or _declare_) a variable, use <code>let</code> keyword.

```js
let firstName;
```

when we assign or store the information, we use the <code>=</code> keyword

```js
let firstName;
firstName = "Deepak"; // store the string 
```

> we use [camelCase](https://en.wikipedia.org/wiki/Camel_case) while naming the variable

In single line, we can declare and assign a value to a variable

```js
let firstName = "Deepak";
```

we can also declare multiple variables at once in a single statement

```js
let firstName = "Deepak", lastName = "Kumar"; // multiple assignments
```

You can use any [unicode](https://en.wikipedia.org/wiki/Unicode) character in a variable name. You can even use emoji as variable name :tada:

```js
let \u1f60b1 = "iPhone";
```

> It is not recommended to use emoji as identifier

We can also copy data from one variable to another

```js
let firstName = "Deepak";
let firstName2 = "Suriya";
firstName = firstName2;

```

## Variable naming

 - Variables must be identified with unique names.
 - Names can contain letters, digits, underscores, and dollar signs.
 - Reserved like <code>let</code> can not be used as variable name.
 - Variable names are case sensitive.

 > country and Country are different variables

 - Variable names must begin with letters.
    - Variable names can also begin with $ and _.

```js
let $ = 4; // 4
let _ = $ + 1; // 5
```

## Constants

Variable declared with <code>let</code> can be changed or reassigned later. Sometimes you don't want your variable to be changed like PORT number of  your server. Once <code>const</code> is initialized, its value can never be changed again. An attempt to do so would cause an error.

```js
const PORT = 1313; // declare a constant
```

constants are named using capital letters and underscores.

```js
const IP_ADDRESS = '127.0.0.1';
const WHITE_COLOR = '#ffffff';
```

Constants can also  used as aliases for difficult to remember values like **color codes**.

## Using var

<code>var</code> also declares a variable like <code>let</code>. You can find the <code>var</code> in old scripts.

```js
var score = 10;
```
<code>var</code> is slightly different from <code>let</code>. We will cover the differences later.
Git and GitHub
Tags: git, github, webdev, beginners
Published: 2018-12-06 18:49:50

---
title: Git and GitHub
published: true
description: 
tags: #git #github #webdev #beginners
---
![alt text](https://thepracticaldev.s3.amazonaws.com/i/rl1d826ocqfkifpqgn52.jpg)

<h3>Git and GitHub for Beginners</H3>

If you are new to coding, you can be overwhelmed with all the new technologies you will start using, not just by its installation but its use itself. One of the most used and commented between programmers is Git and GitHub.

But what is the difference. Git is a free and distributed version control system, it is considered modern and mature; it is and actively maintained open source. It allows tracking changes in computer files and project collaboration with more than one person; one of its main characteristics is its efficiency handling large projects. In other words, is a tool to manage your source code or repositories.
GitHub is a hosting service for the Git repositories, so even when they are not the same, they work together: Git is a tool, and GitHub is the hosting server for projects using Git.

**Install Git and create GitHub Account**

You can follow the installation link and it will walk you through all the installation steps, there is also the option to install it through the command line, but I will not include it in this post.

For Mac, follow the link:

http://git-scm.com/download/mac

For windows, follow the link:

http://git-scm.com/download/win

**Create a GitHub account**

Steps:

1.Go to the GitHub sign up page. 

![alt text](https://thepracticaldev.s3.amazonaws.com/i/cw5fhwdvcjyio04lvf5g.jpg)

2.Enter a username, valid email address, and letter, one numeral, and seven characters.

3.Review carefully the GitHub Terms of Service and Privacy Policy before continuing. Upon clicking the “Create an account” button you will simultaneously be agreeing to these documents.

4.Choose a plan. You have two choices: Free and paid. 

![alt text](https://thepracticaldev.s3.amazonaws.com/i/p0axosp36lqk7enazjci.jpg)

5.Tailor your experience. 

![alt text](https://thepracticaldev.s3.amazonaws.com/i/hxlh3yncjl4hohe7yj55.png)

6.Your GitHub account is created!


Enjoy your coding !!!
How do you Think in Angular?
Tags: angular, javascript
Published: 2019-02-20 03:51:54

---
title: How do you Think in Angular?
published: true
description: I am new to Angular, I had used AngularJS before but since they released the Angular 2+, I had been lost and dropped out of the Angular world.
tags: angular, javascript
---

Hi everyone,

I am new to Angular, I had used AngularJS before but since they released the Angular 2+, I had been lost and dropped out of the Angular world.

<img src="https://media.giphy.com/media/12rTjvF0ANQJsk/giphy.gif" alt="I do not want to be left out of the Angular world"/>

Now I really want make a comeback.

I have scanned the official documentation (which I feel too overwhelming), I have watched tutorial, ... But I still can not really think in Angular.

I have been a ReactJS developer for a while and I think that the ReactJS team has done an amazing job documenting their product with short but enough information without the feeling of too much.

I would love to know your opinion about this. If you can share with me how can you think in Angular that would be awesome.

Thank you.
Recover Lost Deleted “Git stash” using “Git fsck”
Tags: actions, softwaredevelopment, tools
Published: 2019-10-01 17:33:45

---
title: Recover Lost Deleted “Git stash” using “Git fsck”
published: true
tags: Actions,software development,Tools
cover_image: https://esabook.files.wordpress.com/2019/02/delete-stamp-sign-text-word-logo-red-deleted-stamper-79145792.jpg
canonical_url: https://esabook.wordpress.com/2019/02/20/recover-lost-deleted-git-stash-using-git-fsck/
---

1- Open Repository Directory in Terminal / Git Bash.  
  `git fsck | awk ‘{print $3}’ > ids.txt  
  cat ids.txt | xargs git show > logs.txt`

2- Then open `​logs.txt`, and find deleted stash `id`.  
<pre>
example:  
commit a31b0a30701933cfb3d8a55cd4b96320865ae558  
Merge: c465de7 57a3521  
Author: Egit Saputra \<egit@yyyyy.yyy\>  
Date: Tue Feb 19 14:37:29 2019 +0900  
On development: deleted stash test
</pre>

3- and recover with `git stash apply ` to current active branch.  
`git stash apply a31b0a30701933cfb3d8a55cd4b96320865ae558`
Golang open source for beginners
Tags: go, beginners, help
Published: 2019-02-20 00:36:41

---
title: Golang open source for beginners
published: true
description: 
tags: go, beginners, help
---

In my spare time I have been reading about Go, and going through video and blog tutorials to try to get some experience with the language. I've been doing PHP/Laravel full time for work for over 3 years, so that's my background pretty much.

I want to work on a project during my free few hours, and I was curious if anyone can recommend a project that would be open to having some help from an absolute beginner.

The biggest hurdle for me is even figuring out how the project is supposed to work.

Suggestions are highly appreciated!
Changing career later in life
Tags: career, webdev
Published: 2019-02-19 23:40:47

---
title: Changing career later in life
published: true
cover_image: https://images.unsplash.com/photo-1483213097419-365e22f0f258?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80
description: 
tags: career, webdev
---


I’m a forever student. I even had this as a part of my bio for a while, until I began to feel like maybe that’s a bad thing to say about myself. Surely, jumping from one interest to another doesn’t sound like a good personality trait. Jack of all trades, master of none. No one wants to be that. 

However, it describes me perfectly. I studied business studies at high school but worked in the shipping industry in my early to mid-20s.  Decided to go to university in my late 20s but didn’t study business or transportation or logistics, instead, I graduated with honours in Psychology. Worked with children and adults with various mental and physical disabilities but in my mid-30s, I stumbled upon web development. I became a web developer.

To anyone else, this might indeed seem like a very random journey. I mean, who in their right mind switches career 3 times by the time they are 38?

Well, I did. And in hindsight, I see a perfect sense in my journey. Every job I had in the past made me a better developer today. The developer I am now is made of experiences, knowledge and skills acquired during my previous career, during my studies and my work with disabled people.

So why a forever student?

Looking back, there is one common thread that connects all of the above. I love to learn new things. I am not afraid of new topics, in fact, I seek them out. I’m that kind of student who loves homework! I love the feeling of figuring something new out. Breaking down barriers in understanding, challenging myself. Which is why, as a self-proclaimed sufferer from math phobia, I took a mathematics module during my Psychology degree. And completed it with distinction.

And which is why web development turned out to be the right career for me. 

You can never stop learning as a developer. The web development landscape changes often, and while I don’t believe we need to know it all, we do need to be aware of what is out there. Some people might find it scary and never-ending, I find it refreshing. 

And it is good for us: learning new things and solving puzzles and challenges keeps our brain healthy.

Changing career later in life is scary. People already have commitments. Responsibilities. It's hard to just turn your life around and start over.

But you are not starting over. You are building upon who you already are and what you already have. You are growing.

I realised I’m ok with being a forever student. It turned out to be my strength after all!

I don’t believe in stagnation. You either move forward, or you go back. 

And I'm moving forward.
What are your go-to libraries for input masking?
Tags: discuss, javascript, webdev
Published: 2019-02-19 23:13:29

My definition of input masking:

> Formatting of user-input in an `<input>` element as it is provided, into a preset shape/structure

For example, here is a set of phone inputs that have masks setup:

![Image of HTML input elements that have preset 'masks' to auto-format user input](https://i2.wp.com/www.cssscript.com/wp-content/uploads/2018/11/Basic-Phone-Input-Mask-With-Pure-JavaScript-phone-mask.png)

[This CSS-Tricks](https://css-tricks.com/input-masking/) link showcases some examples as well as some libraries, but I'm interested in what the DEV community uses nowadays (that post is ~2 years old).

**Bonus points** if the library is framework agnostic, i.e. does not use jQuery, Angular, React, Vue, etc.
Learning JavaScript: Take 1.
Tags: javascript, codenewbie
Published: 2019-02-19 22:54:39

---
title: Learning JavaScript: Take 1.
published: true
description: Rithm School Review
tags: JavaScript, CodeNewbie
cover_image: https://thepracticaldev.s3.amazonaws.com/i/8scxg9fgnactbl0ngbn4.png
---

Hello, world!

My experience with JavaScript is almost entirely composed of Angular 😅I shudder when I think back to that time. The project was one of my first assignments at work right out of college. I spent several days figuring out what was going on because the project was in Angular using ECMA 2016. There were almost no copy/paste examples with this combination of dependencies. I remember the ordeal I had getting my environment set up — every time my “liquid desktop” was restarted by Big Brother I’d lose everything. That was the last time I worked with JavaScript and I have, for the most part, tried to stay away. I am taking on JavaScript again in the hopes that a more positive learning experience can encourage me to push past the hurdles.

I got recommendations from my Twitter feed for JavaScript learning resources recently. ocean diaali mentioned rithmschool.com/courses. I had never heard of the site before. The courses are divided by experience level and so I chose to start at the beginning with the very first class to give me some quick wins.

First up was JavaScript tools. Websites like codecademy.com skip learning this part at first. I’m glad this lesson started with tools though — I fiddled with the Chrome JS console and got curious about the internals of JS. It was enough to motivate me to get through it.

After reading the course material, going through all supplementary sources, and doing all exercises, I feel good about the time spent. The lesson was interactive and the exercises helped me discover new supporting information on the subject. Above all, I am motivated to continue learning JavaScript!

Exercises
1. What is the difference between JavaScript and ECMAScript?
ECMAScript is a standard. JavaScript is an implementation of that standard.

2. Who is Brendan Eich?
Brendan Eich is the creator of JavaScript.

3. How do you hide and show the Chrome console?
To open up the console press `Option + Command + j` on a Mac (or `Control + Shift + J` on Windows and Linux). Another way to get to the console is to right click on the web page, select Inspect, and then move to the tab called Console. To hide the console, press on the X icon on the upper right hand side of the console.

4. Create a simple page with a script tag. Inside of the script tag declare a couple of variables and then log their values to the console.
Check out my answer here: {% codepen https://codepen.io/flosal-bccs/pen/mvPGgQ/ %}

5. Research `prompt` and `confirm` - what do they do?
`prompt` displays a dialog with an optional message prompting the user to input some text. `confirm` displays a modal dialog with an optional message and two buttons, OK and Cancel.

*Cross-posted on Medium.*
Dev.dev! Get your .dev domain now!
Tags: discuss
Published: 2019-02-19 22:03:38

---
title: Dev.dev! Get your .dev domain now!
published: true
description: "I like turtles"
tags: discussion
---

Well, it looks like it's time! For an easy $11,000 USD you to can [get a `.dev` domain](https://www.blog.google/technology/developers/hello-dev/)! I bought `to.dev` (I didn't really) so I can start a mirror world dev.to.

![Mirror. Mirror](https://i.pinimg.com/originals/0b/8a/72/0b8a72a6413ec8038473b52fba3774ab.gif)

Anyone else planning on getting one when the price becomes a bit more reasonable?
(How) do you write technical specifications when adding complex new features?
Tags: discuss, process, softwaredesign
Published: 2019-02-19 21:51:37

---
title: (How) do you write technical specifications when adding complex new features?
published: true
tags: discuss, process, software design
---

When adding a complex new feature, how do you plane it in advance? Do you write a technical specification? What level of detail do you go into? How do you document how the new feature interacts with existing code?

If you write technical specs for an open source software, or your company is willing to make a technical spec public, I'd love to see it.
I developed "Minimal Login" a Flutter app for implementing "Minimal Login Light & Dark Version" UI/UX design by Anmol Arora
Tags: flutter, ui, ux, app
Published: 2019-02-19 21:42:28

---
title: I developed "Minimal Login" a Flutter app for implementing "Minimal Login Light & Dark Version" UI/UX design by Anmol Arora
published: true
description: This Flutter app is part of a collection of apps that I developed with the purpose of mastering the necessary skills for implementing custom UI/UX designs in Android and iOS.
tags: #flutter #ui #ux #app
---

This app is part of a collection of apps that I developed in Flutter with the purpose of mastering the necessary skills for implementing custom UI/UX designs in Android and iOS.

You can find the entire collection of apps in [this blog post](https://dev.to/crivasgomez/flutter-uiux-design-implementations-518i) and all the source code in [this GitHub repository](https://github.com/CRivasGomez/flutter-ui-ux-designs).

## Minimal Login

### [Original design](https://www.uplabs.com/posts/minimal-login-light-dark-version) by [Anmol Arora](https://www.uplabs.com/anmol3107):

![Original design](https://thepracticaldev.s3.amazonaws.com/i/8crmzkveqtppyrsryh5m.png)

### iOS demo:

![iOS demo](https://thepracticaldev.s3.amazonaws.com/i/7pupa0evvoxohahv1hk9.gif)

### Android demo:

![Android demo](https://thepracticaldev.s3.amazonaws.com/i/ryh94v4lq1sh4d092iam.gif)
Why I love Frontend: two triangles
Tags: frontend
Published: 2019-02-19 21:41:20

---
title: Why I love Frontend: two triangles
published: true
description: The beauty of Frontend
tags: frontend
---

![The beauty of Frontend](https://i.imgur.com/JtbFPNA.png)
<figcaption>The beauty of Frontend</figcaption>
Not much to add: the chance to work Product ⇆ Frontend ⇆ Design and Backend ⇆ Frontend ⇆ DevOps - that's what make our position unique.
How often have you created a state machine diagram?
Tags: askdev, career, discuss
Published: 2019-02-19 21:06:27

---
title: ‪How often have you created a state machine diagram?‬
published: true
description: 
tags: askdev, career, discuss
---

![state machine diagram](https://css-tricks.com/wp-content/uploads/2018/07/state-machines-2.png)

I was looking through job listings and I noticed one of the positions requested experience in creating state machine diagrams as a frontend or full-stack developer.

It made me wonder, how often do devs actually take the time to diagram their state or state machines? Do you have any examples you can share from your projects if so?
Cloudflare announced workers.dev
Tags: discuss, news, cloudflare, serverless
Published: 2019-02-19 20:30:14

---
title: Cloudflare announced workers.dev
published: true
description: Cloudflare announced workers.dev
tags: discuss, news, cloudflare, serverless
cover_image: https://thepracticaldev.s3.amazonaws.com/i/imo4iqx6ycor918w5vxi.png
---

Cloudflare [announced](https://workers.dev/) their  `workers.dev` service today.
Currently it is in pre-registration stage, you can sign up for a custom `workers.dev` subdomain (sign up is free).

Some basic info what this is, most people here probably have heard about Cloudflare Workers (or some other serverless alternative). Well before if you wanted to host a serverless application on Cloudflare you had to already own a domain and change your nameservers to Cloudflares nameservers.
Not everyone might now how to get a domain, manage nameservers (or other DNS settings), so with this new service Cloudflare will take care of all that. You get the full power of Cloudflare Workers without needing to manage the things around it.

Here is the [Cloudflare blog post](https://blog.cloudflare.com/announcing-workers-dev/) if you want to read about it.

I personally have no experience in serverless applications but always wanted to try it out. I pre-registered `glenn.workers.dev` and hope to experiment with it soon.

What do you think about this new service? What would you build with it? Or are there any alternatives that are better in your opinion than Cloudflare Workers?
Announcing Teensy: A little bitty ruby serverless framework
Tags: ruby, serverless, heroku
Published: 2019-02-20 19:01:35

---
title: Announcing Teensy: A little bitty ruby serverless framework
published: true
tags: [ruby, serverless, heroku]
canonical_url: https://scottw.com/s67
---

I was playing around with FaaStRuby when it dawned on me that everything needed to build my own serverless ruby framework was right in front me (Heroku + Sinatra).

Then, all I remember seeing is dollar signs and code flying across my terminal. On my second git push to Heroku, [Teensy](https://github.com/scottwater/teensy) was born.

I am only semi-joking. Most of what you would do ‘serverless’ could easily be accomplished with this code.

If I am really missing the mark on some thing, please let me know.
Battlesnake – Competitive Snake Games Over HTTP
Tags: beginners
Published: 2019-02-19 20:23:56

---
title: 	Battlesnake – Competitive Snake Games Over HTTP
published: true
description: Just launched the battlesnake platform for playing competitive snake games over http at https://play.battlesnake.io.
tags: #beginners
---

Looking for a fun side project? We at battlesnake want to encourage programmers to collaborate on a fun an engaging platform that allows them to practice the basics of learning.

See the platform at: https://play.battlesnake.io
CouchDB views observation
Tags: couchdb
Published: 2019-07-19 13:22:16

---
title: CouchDB views observation
published: true
tags: couchdb
canonical_url: https://ofdigitalwater.postach.io/post/couchdb-views-observation
---

> CouchDB views are more like `CREATE INDEX` than `SELECT`: [https://stackoverflow.com/a/9237735](https://stackoverflow.com/a/9237735)
Over 5000 Followers! New blog at creativebracket.com
Tags: dart, webdev, beginners, javascript
Published: 2019-02-19 17:55:15

## I'm really lost for words!

The support has been amazing and it's with much more excitement that I announce the launch of my personal blog–[**creativebracket.com**](https://creativebracket.com). 

This will be the _go-to_ destination for exclusive, high-quality Dart tutorials, teaching you to master the basics of full-stack web development and beyond.

The feedback so far already looks promising:

{% twitter 1097854653616844800 %}

Do check it out and let me know your thoughts!

**Like, share and [follow me](https://twitter.com/creativ_bracket)** for more content on Dart.
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2019-02-19 17:18:56

---
title: Top 5 DEV Comments from the Past Week
published: true
description: Highlighting some of the best DEV comments from the past week.
tags: bestofdev
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--7VrAA2ln--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/qmb5wkoeywj06pd7p8ku.png
---

This is a weekly roundup of awesome DEV comments that you may have missed.  You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag.

In response to an article titled **[There's no such thing as a full stack developer](https://dev.to/tevko/theres-no-such-thing-as-a-full-stack-developer-1m3i)**, @matteorigon offers their opinion on the term:
{% devcomment 8lcn %}

The **[What was your win this week?](https://dev.to/jess/what-was-your-win-this-week-50fe)** is quickly becoming a community favorite, and again was a source of wonderful comments.  No "win" was more-loved than this great news from @_bigblind!
{% devcomment 8n5a %}

@stevensacks provided a thorough reply to the **[Why I Switched From Visual Studio Code To JetBrains WebStorm](https://dev.to/mokkapps/why-i-switched-from-visual-studio-code-to-jetbrains-webstorm-939)** thread.  Be sure to check out the original article as well.
{% devcomment 8n5c %}

In response to **[The Rules of Debugging](https://dev.to/codemouse92/the-rules-of-debugging-2hf5)**, @idanarye offered an awesome follow-up to a popular joke:
{% devcomment 8nfo %}

The **[Stop tracking and start ignoring](https://dev.to/svijaykoushik/stop-tracking-and-start-ignoring-ook)** inspired a great comment from @tmaila:
{% devcomment 8o2a %}

See you next week for more great comments ✌