lavas | 基于 Vue 的 PWA 解决方案,帮助开发者快速搭建 PWA 应用,解决接入 PWA 的各种问题 | Single Page Application library
kandi X-RAY | lavas Summary
kandi X-RAY | lavas Summary
lavas
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lavas
lavas Key Features
lavas Examples and Code Snippets
Community Discussions
Trending Discussions on lavas
QUESTION
I've created a quiz app from a youtube tutorial. Now I want to add a score in order for the player to view it. The app works by adding 3 points if you choose option a, 2 if you choose b and 1 if you choose c.
But whenever I change questions, the score value goes back to 0, how can I fix it?
...ANSWER
Answered 2017-May-28 at 06:56You are set the value of total in viewDidLoad method, because you calling this method when nextQuestion button pressed, the total value will be 0 again. You need to move the equals 0 outside the viewDidLoad method. For example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lavas
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page