<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JavaScript Archives : vedmant.com : coding blog</title>
	<atom:link href="https://vedmant.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>https://vedmant.com/category/javascript/</link>
	<description>Sharing my personal experience in web development</description>
	<lastBuildDate>Sun, 24 Nov 2019 19:24:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>Running Time &#8211; React Native Sample Application</title>
		<link>https://vedmant.com/running-time-react-native-sample-application/</link>
					<comments>https://vedmant.com/running-time-react-native-sample-application/#comments</comments>
		
		<dc:creator><![CDATA[vedmant]]></dc:creator>
		<pubDate>Sun, 24 Nov 2019 19:23:02 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[My Projects]]></category>
		<category><![CDATA[React Native]]></category>
		<category><![CDATA[Mobile App]]></category>
		<guid isPermaLink="false">https://vedmant.com/?p=276</guid>

					<description><![CDATA[<p>Open sources GitHub. Install App from Play Market. Not so long ago I created a simple running tracker &#8211; Running Time that was build on Laravel and Vue as a tutorial to build Single Page Applications. It turned out to be quite helpful learning app for many people. Now I decided to get to know &#8230; <a href="https://vedmant.com/running-time-react-native-sample-application/" class="more-link">Continue reading <span class="screen-reader-text">Running Time &#8211; React Native Sample Application</span></a></p>
<p>The post <a href="https://vedmant.com/running-time-react-native-sample-application/">Running Time &#8211; React Native Sample Application</a> appeared first on <a href="https://vedmant.com">vedmant.com :: coding blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Open sources <a href="https://github.com/vedmant/running-time-react" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">GitHub</a>. Install App from <a href="https://play.google.com/store/apps/details?id=com.vedmant.runningtime" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">Play Market</a>.</p>



<p>Not so long ago I created a simple running tracker &#8211; <a href="https://github.com/vedmant/running-time">Running Time</a> that was build on Laravel and Vue as a tutorial to build Single Page Applications. It turned out to be quite helpful learning app for many people. Now I decided to get to know React Native a bit more and in the process I created an app that uses that same Laravel API backend.</p>



<p>This mobile App is quite simple it has authentication flow with register and login pages. Main screen with three tabs, &#8220;Dashboard&#8221;, &#8220;Entries&#8221; and &#8220;Profile&#8221;. </p>



<p>Here is more detailed list of features:</p>



<ul class="wp-block-list"><li>Simple and clean code</li><li>Redux with redux-thunk</li><li>Auth flow: login and registration</li><li>Dashboard tab with panels and charts</li><li>Entries list tab</li><li>Add / edit entry</li><li>Infinite scroll</li><li>Pull to refresh</li><li>Profile tab: update profile</li></ul>



<p>The app is free to use and modify in any way and has MIT license.</p>



<p>Open sources <a rel="noreferrer noopener" href="https://github.com/vedmant/running-time-react" target="_blank">GitHub</a>. Install App from <a rel="noreferrer noopener" href="https://play.google.com/store/apps/details?id=com.vedmant.runningtime" target="_blank">Play Market</a>.</p>
<p>The post <a href="https://vedmant.com/running-time-react-native-sample-application/">Running Time &#8211; React Native Sample Application</a> appeared first on <a href="https://vedmant.com">vedmant.com :: coding blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://vedmant.com/running-time-react-native-sample-application/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Sample Single Page Application (SPA) using Laravel 5 &#038; Vue2 + Vuex + Vue-Router</title>
		<link>https://vedmant.com/sample-single-page-application-spa-using-laravel-5-vue2-vuex-vue-router/</link>
					<comments>https://vedmant.com/sample-single-page-application-spa-using-laravel-5-vue2-vuex-vue-router/#comments</comments>
		
		<dc:creator><![CDATA[vedmant]]></dc:creator>
		<pubDate>Sat, 19 Aug 2017 18:04:16 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[My Projects]]></category>
		<category><![CDATA[Vue.js]]></category>
		<category><![CDATA[E2E tests]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[SPA]]></category>
		<category><![CDATA[vue-router]]></category>
		<category><![CDATA[Vuex]]></category>
		<guid isPermaLink="false">https://vedmant.com/?p=180</guid>

					<description><![CDATA[<p>Not to long ago I implemented a sample Single Page Application using Laravel 5 and Vue2 + Vuex + Vue-Router. Today I decided to make it public and share my experience with others. The project is basically a simple Running Tracker, where you can add your running entries and see your performance during some period &#8230; <a href="https://vedmant.com/sample-single-page-application-spa-using-laravel-5-vue2-vuex-vue-router/" class="more-link">Continue reading <span class="screen-reader-text">Sample Single Page Application (SPA) using Laravel 5 &#038; Vue2 + Vuex + Vue-Router</span></a></p>
<p>The post <a href="https://vedmant.com/sample-single-page-application-spa-using-laravel-5-vue2-vuex-vue-router/">Sample Single Page Application (SPA) using Laravel 5 &#038; Vue2 + Vuex + Vue-Router</a> appeared first on <a href="https://vedmant.com">vedmant.com :: coding blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Not to long ago I implemented a sample Single Page Application using Laravel 5 and Vue2 + Vuex + Vue-Router.</p>
<p>Today I decided to make it public and share my experience with others.</p>
<p>The project is basically a simple Running Tracker, where you can add your running entries and see your performance during some period of time.</p>
<h3>Main features</h3>
<ul>
<li>Fully separate Backend and Frontend</li>
<li>Authentication based on Laravel Passport</li>
<li>List pages with filters and CRUD editing</li>
<li>Admin panel</li>
<li>Simple widgets</li>
<li>Simple reports</li>
<li>Full Phpunit test coverage</li>
<li>Sample E2E tests using Nightwatch and Cypress</li>
</ul>
<h3>Includes</h3>
<ul>
<li><a href="https://laravel.com/docs/5.4/passport">Laravel Passport</a> API Authentication</li>
<li><a href="https://github.com/mpociot/laravel-apidoc-generator">API Docs Gerator</a> Laravel API Documentation Generator</li>
<li><a href="https://github.com/barryvdh/laravel-debugbar">Laravel DebugBar</a> Debug bar for Laravel</li>
<li><a href="https://vuejs.org/">Vue.js</a> The Progressive JavaScript Framework</li>
<li><a href="https://vuex.vuejs.org/en/intro.html">Vuex</a> State management pattern + library for Vue.js</li>
<li><a href="https://router.vuejs.org/en/">Vue-Router</a> Router library for Vue.js</li>
</ul>
<h3>Other Features</h3>
<ul>
<li>Front page</li>
<li>Authentication (registration, login, logout, throttle)</li>
<li>Users roles: administrator (all access), manager (manage records)</li>
<li>User dashborad with widgets and charts</li>
<li>Entries list with filter by date (list, show, edit, delete, create)</li>
<li>Report page with chart</li>
<li>User profile page</li>
<li>Admin dashboard with widgets</li>
<li>Users admin (list, show, edit, delete, create)</li>
<li>Entries admin (list, show, edit, delete, create)</li>
<li>Global loader for all requests with small delay</li>
</ul>
<p><div class="carousel-slider-outer carousel-slider-outer-image-carousel carousel-slider-outer-191" style="--carousel-slider-nav-color:#f1f1f1;--carousel-slider-active-nav-color:#4caf50;--carousel-slider-arrow-size:48px;--carousel-slider-bullet-size:10px">
<div id="&#039;id-191" class="carousel-slider carousel-slider-191 arrows-visibility-always dots-visibility-never arrows-outside dots-center dots-circle owl-carousel" data-slide-type="image-carousel" data-owl-settings='{"nav":true,"dots":false,"slideBy":1,"stagePadding":0,"margin":10,"loop":true,"lazyLoad":true,"autoplay":true,"autoplayTimeout":10000,"autoplaySpeed":500,"autoplayHoverPause":true,"autoWidth":false,"responsive":{"300":{"items":1},"576":{"items":1},"768":{"items":1},"1024":{"items":1},"1280":{"items":1},"1536":{"items":1}}}'>
<div class="carousel-slider__item">
	<img class="owl-lazy" data-src="https://vedmant.com/wp-content/uploads/2017/08/2017-08-19_1712.jpg" alt=""></a></div>

<div class="carousel-slider__item">
	<img class="owl-lazy" data-src="https://vedmant.com/wp-content/uploads/2017/08/2017-08-19_1713.jpg" alt=""></a></div>

<div class="carousel-slider__item">
	<img class="owl-lazy" data-src="https://vedmant.com/wp-content/uploads/2017/08/2017-08-19_1713.png" alt=""></a></div>

<div class="carousel-slider__item">
	<img class="owl-lazy" data-src="https://vedmant.com/wp-content/uploads/2017/08/2017-08-19_1714.jpg" alt=""></a></div>

</div><!-- .carousel-slider-191 -->
</div><!-- .carousel-slider-outer-191 -->
</p>
<p></p>
<p><a href="https://github.com/vedmant/running-time">GitHub Link</a></p>
<p><a href="https://running-time.vedmant.com/">Demo</a></p>
<p>Use login: <code>user@gmail.com</code> and password: <code>123456</code></p>
<p>This project is fully free to use for any purpose and licenced under MIT License.</p>
<p>The post <a href="https://vedmant.com/sample-single-page-application-spa-using-laravel-5-vue2-vuex-vue-router/">Sample Single Page Application (SPA) using Laravel 5 &#038; Vue2 + Vuex + Vue-Router</a> appeared first on <a href="https://vedmant.com">vedmant.com :: coding blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://vedmant.com/sample-single-page-application-spa-using-laravel-5-vue2-vuex-vue-router/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Why JavaScript &#8220;++[[]][+[]]+[+[]]&#8221; expression returns string &#8220;10&#8221;</title>
		<link>https://vedmant.com/javascript-expression-returns-string-10/</link>
					<comments>https://vedmant.com/javascript-expression-returns-string-10/#respond</comments>
		
		<dc:creator><![CDATA[vedmant]]></dc:creator>
		<pubDate>Sun, 14 May 2017 16:25:25 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Riddle]]></category>
		<guid isPermaLink="false">https://vedmant.com/?p=165</guid>

					<description><![CDATA[<p>Recently I came over quite interesting expressions ++[[]][+[]]+[+[]] and if you open browser JavaScript console and paste it there it will return string &#8220;10&#8221;, but how it really works? This is something that took my mind yesterday and I decided to make it clear for me: Firstly, +[] in JavaScript is the same as +"" &#8230; <a href="https://vedmant.com/javascript-expression-returns-string-10/" class="more-link">Continue reading <span class="screen-reader-text">Why JavaScript &#8220;++[[]][+[]]+[+[]]&#8221; expression returns string &#8220;10&#8221;</span></a></p>
<p>The post <a href="https://vedmant.com/javascript-expression-returns-string-10/">Why JavaScript &#8220;++[[]][+[]]+[+[]]&#8221; expression returns string &#8220;10&#8221;</a> appeared first on <a href="https://vedmant.com">vedmant.com :: coding blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Recently I came over quite interesting expressions <code>++[[]][+[]]+[+[]]</code> and if you open browser JavaScript console and paste it there it will return string &#8220;10&#8221;, but how it really works?</p>
<p>This is something that took my mind yesterday and I decided to make it clear for me:</p>
<ol>
<li>Firstly, <code>+[]</code> in JavaScript is the same as <code>+""</code> which casts a value to number 0, which is used twice, so if we replace it, we can now see following:
<pre class="brush: jscript; title: ; notranslate">
++&#x5B;&#x5B;]]&#x5B;0]+&#x5B;0]
</pre>
</p>
</li>
<li>
<p>Now we can split it to two three separate expressions:</p>
<pre class="brush: jscript; title: ; notranslate">
++ // Increment operator
&#x5B;&#x5B;]]&#x5B;0] // Which returns &#x5B;], that casts to 0 and then incremented to 1 (++ always returns a number)
+&#x5B;0] // Which returns 0
</pre>
</p>
</li>
<li>
<p><code>[[]][0]</code> means we get the first element from array <code>[[]]</code> which has one element that&#8217;s empty array and then increment it by 1, let&#8217;s write it in JS:</p>
<pre class="brush: jscript; title: ; notranslate">
&#x5B;&#x5B;]]&#x5B;0] // &#x5B;], or
&#x5B;&#x5B;]].pop() // &#x5B;]
</pre>
</p>
</li>
<li>
<p>Getting 1 from <code>++[[]][0]</code>, as we figured out <code>[[]][0]</code> basically means just empty array or, <code>[]</code>, then we have <code>[] + 1</code> which returns string &#8220;1&#8221;, and due to ++ always returns number, we have just number 1:</p>
<pre class="brush: jscript; title: ; notranslate">
++&#x5B;&#x5B;]]&#x5B;0] // 1
++&#x5B;&#x5B;]]&#x5B;0] === +(&#x5B;] + 1) // true
+(&#x5B;] + 1) === 1 // true
</pre>
</p>
</li>
<li>
<p>And the last part <code>+ [0]</code>, when we add array to anything in JavaScript, it will concatenate it to string of values with commas:</p>
<pre class="brush: jscript; title: ; notranslate">
0 + &#x5B;0, 1, 2, 3] // &quot;00,1,2,3&quot;
&#x5B;1,2] + &#x5B;3,4] // &quot;1,23,4&quot;

// Or in our case
1 + &#x5B;0] // &quot;10&quot; - Yay!
</pre>
</p>
</li>
</ol>
<p>To sum it up, lets describe it in single place:</p>
<pre class="brush: jscript; title: ; notranslate">
++ // Increment result of next expression, or make number 1
    &#x5B;
        &#x5B;] // Array with single empty array item
    ]
    &#x5B; // Use bracket expression to access 0 element of previous array, which is empty array &quot;&#x5B;]&quot;
        +&#x5B;] // Cast array to 0
    ]

+ // Unary + Operator, or 1 + &#x5B;0]

&#x5B; // Array with one element of number 0
    +&#x5B;] // Cast array to 0
]
</pre>
<p>The post <a href="https://vedmant.com/javascript-expression-returns-string-10/">Why JavaScript &#8220;++[[]][+[]]+[+[]]&#8221; expression returns string &#8220;10&#8221;</a> appeared first on <a href="https://vedmant.com">vedmant.com :: coding blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://vedmant.com/javascript-expression-returns-string-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
